Skip to content

Commit 298bc95

Browse files
去除说明文档
1 parent f62292d commit 298bc95

File tree

4 files changed

+4
-35
lines changed

4 files changed

+4
-35
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ option(BUILD_STATIC_LIBS ON)
5050
option(BUILD_SHARED_LIBS OFF)
5151
add_subdirectory(external/Qt-Color-Widgets EXCLUDE_FROM_ALL)
5252

53-
54-
if (APPLE)
55-
add_subdirectory(external/QHotkey)
56-
endif()
5753
add_subdirectory(src)
5854

5955
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") # TODO: Where is this used? Do we need a better

external/QHotkey/CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,7 @@ set(LIBS
1111
set(SRC_FILES
1212
qhotkey.cpp)
1313

14-
if(APPLE)
15-
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
16-
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
17-
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
18-
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
19-
20-
find_library(CARBON_LIBRARY Carbon)
21-
mark_as_advanced(CARBON_LIBRARY)
22-
23-
set(SRC_FILES ${SRC_FILES} qhotkey_mac.cpp)
24-
set(LIBS ${LIBS} ${CARBON_LIBRARY})
25-
elseif(WIN32)
14+
if(WIN32)
2615
set(SRC_FILES ${SRC_FILES} qhotkey_win.cpp)
2716
else()
2817
find_package(X11 REQUIRED)

src/CMakeLists.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -363,20 +363,4 @@ if (WIN32)
363363
endif ()
364364
endif ()
365365

366-
# macdeployqt
367-
if (APPLE)
368-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
369-
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QTDIR)
370-
string(REGEX REPLACE "\n$" "" QTDIR "${QTDIR}")
371-
set(MAC_DEPLOY_QT ${QTDIR}/bin/macdeployqt)
372-
if (EXISTS ${MAC_DEPLOY_QT})
373-
set_source_files_properties(resources/icon.icns PROPERTIES
374-
MACOSX_PACKAGE_LOCATION Resources)
375-
376-
set_target_properties(${target} PROPERTIES
377-
MACOSX_BUNDLE TRUE
378-
)
379-
else ()
380-
message("Unable to find executable ${MAC_DEPLOY_QT}.")
381-
endif ()
382-
endif ()
366+

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ QSharedMemory* guiMutexLock()
7676

7777
int main(int argc, char* argv[])
7878
{
79-
#ifdef Q_OS_LINUX
79+
#if defined(Q_OS_LINUX)
8080
wayland_hacks();
8181
#endif
8282

@@ -119,7 +119,7 @@ int main(int argc, char* argv[])
119119
auto c = Flameshot::instance();
120120
FlameshotDaemon::start();
121121

122-
#if !(defined(Q_OS_MACOS) || defined(Q_OS_WIN))
122+
#if !(defined(Q_OS_WIN))
123123
new FlameshotDBusAdapter(c);
124124
QDBusConnection dbus = QDBusConnection::sessionBus();
125125
if (!dbus.isConnected()) {

0 commit comments

Comments
 (0)