11add_executable (qBittorrent
2- # headers
3- application.h
4- applicationinstancemanager.h
5- cmdoptions.h
6- filelogger.h
7- qtlocalpeer/qtlocalpeer.h
8- upgrade.h
9-
10- # sources
11- application.cpp
12- applicationinstancemanager.cpp
13- cmdoptions.cpp
14- filelogger.cpp
15- main.cpp
16- qtlocalpeer/qtlocalpeer.cpp
17- upgrade.cpp
2+ # headers
3+ application.h
4+ applicationinstancemanager.h
5+ cmdoptions.h
6+ filelogger.h
7+ qtlocalpeer/qtlocalpeer.h
8+ upgrade.h
9+
10+ # sources
11+ application.cpp
12+ applicationinstancemanager.cpp
13+ cmdoptions.cpp
14+ filelogger.cpp
15+ main.cpp
16+ qtlocalpeer/qtlocalpeer.cpp
17+ upgrade.cpp
1818)
1919
2020target_include_directories (qBittorrent PRIVATE ${CMAKE_CURRENT_BINARY_DIR } )
21- target_link_libraries (qBittorrent
22- PRIVATE
23- qbt_base
24- )
21+ target_link_libraries (qBittorrent PRIVATE qbt_base )
2522
2623set_target_properties (qBittorrent
2724 PROPERTIES
@@ -42,8 +39,8 @@ if (NOT DISABLE_WEBUI)
4239endif ()
4340
4441set (QBT_APP_RESOURCES
45- ../icons/icons.qrc
46- ../searchengine/searchengine.qrc
42+ ../icons/icons.qrc
43+ ../searchengine/searchengine.qrc
4744)
4845
4946# With AUTORCC rcc is ran by cmake before language files are generated,
@@ -53,49 +50,53 @@ qt5_add_resources(QBT_APP_RESOURCE_SOURCE ${QBT_APP_RESOURCES})
5350if (WIN32 )
5451 if (MINGW)
5552 target_sources (qBittorrent PRIVATE ../qbittorrent_mingw.rc )
56- else ( MINGW )
53+ else ( )
5754 target_sources (qBittorrent PRIVATE ../qbittorrent.rc )
58- endif (MINGW )
55+ endif ()
56+
5957 target_sources (qBittorrent PRIVATE ../qbittorrent.exe.manifest )
60- endif ( WIN32 )
58+ endif ( )
6159
6260if (STACKTRACE)
6361 if (UNIX )
6462 target_sources (qBittorrent PRIVATE stacktrace.h )
65- else ( UNIX )
63+ else ( )
6664 target_sources (qBittorrent PRIVATE stacktrace_win.h )
6765 if (Qt5Widgets_FOUND)
6866 target_sources (qBittorrent PRIVATE stacktracedialog.cpp stacktracedialog.h )
69- endif (Qt5Widgets_FOUND )
67+ endif ()
68+
7069 if (MSVC )
7170 if (NOT "${WINXXBITS} " STREQUAL "Win64" )
7271 # i686 arch requires frame pointer preservation
7372 add_compile_options (-Oy- )
74- endif (NOT "${WINXXBITS} " STREQUAL "Win64" )
73+ endif ()
74+
7575 add_compile_options (-Zi )
7676 target_link_libraries (qBittorrent PUBLIC dbghelp -DEBUG )
77- else ( MSVC )
77+ else ( )
7878 if (NOT "${WINXXBITS} " STREQUAL "Win64" )
7979 add_compile_options (-fno-omit-frame-pointer )
80- endif (NOT "${WINXXBITS} " STREQUAL "Win64" )
80+ endif ()
81+
8182 target_link_libraries (qBittorrent PUBLIC dbghelp -Wl,--export-all-symbols )
82- endif ( MSVC )
83- endif ( UNIX )
84- endif ( STACKTRACE )
83+ endif ( )
84+ endif ( )
85+ endif ( )
8586
8687if (Qt5Widgets_FOUND)
87- target_link_libraries (qBittorrent PRIVATE qbt_searchengine qbt_gui )
88+ target_link_libraries (qBittorrent PRIVATE qbt_gui )
8889 set_target_properties (qBittorrent
8990 PROPERTIES
9091 OUTPUT_NAME qbittorrent
9192 WIN32_EXECUTABLE True
9293 )
93- else (Qt5Widgets_FOUND )
94+ else ()
9495 set_target_properties (qBittorrent
9596 PROPERTIES
9697 OUTPUT_NAME qbittorrent-nox
9798 )
98- endif ( Qt5Widgets_FOUND )
99+ endif ( )
99100
100101if (NOT DISABLE_WEBUI)
101102 target_link_libraries (qBittorrent PRIVATE qbt_webui )
@@ -127,9 +128,8 @@ if (APPLE)
127128 ${QT_TR_DIR} /qt_zh_CN.qm
128129 )
129130 list (APPEND QBT_APP_RESOURCE_SOURCE ${QT_TRANSLATIONS} )
130- set_source_files_properties (${QT_TRANSLATIONS}
131- PROPERTIES MACOSX_PACKAGE_LOCATION translations)
132- endif (APPLE )
131+ set_source_files_properties (${QT_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION translations)
132+ endif ()
133133
134134target_sources (qBittorrent PRIVATE ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE} )
135135
@@ -138,23 +138,24 @@ get_target_property(QBT_EXECUTABLE_NAME qBittorrent OUTPUT_NAME)
138138if (APPLE )
139139 set (qbt_BUNDLE_NAME ${QBT_EXECUTABLE_NAME} )
140140
141- # substitute @EXECUTABLE@ in dist/mac/Info.plist
141+ # substitute @EXECUTABLE@ in dist/mac/Info.plist
142142 set (EXECUTABLE ${qbt_BUNDLE_NAME} )
143143 configure_file (${qBittorrent_SOURCE_DIR } /dist/mac/Info.plist ${qBittorrent_BINARY_DIR } /dist/mac/Info.plist @ONLY )
144144
145145 set_target_properties (qBittorrent PROPERTIES
146146 MACOSX_BUNDLE_BUNDLE_NAME "${qbt_BUNDLE_NAME} "
147147 MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_BINARY_DIR } /dist/mac/Info.plist
148148 )
149- endif ( APPLE )
149+ endif ( )
150150
151151# installation
152152install (TARGETS qBittorrent
153153 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
154154 BUNDLE DESTINATION .
155- COMPONENT runtime )
155+ COMPONENT runtime
156+ )
156157
157158if (Qt5Widgets_FOUND AND APPLE )
158159 find_package (Qt5Svg REQUIRED )
159160 include (bundle )
160- endif ( Qt5Widgets_FOUND AND APPLE )
161+ endif ( )
0 commit comments