Improve CMake configuration

Don't search for QtSingleApplication library.
Fix building on Windows with MinGW.
This commit is contained in:
Vladimir Golovnev (Glassez) 2019-07-20 19:43:08 +03:00
commit 38cf1fb3ee
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
6 changed files with 36 additions and 115 deletions

View file

@ -1,21 +1,12 @@
if (STACKTRACE)
if ("${WINXXBITS}" STREQUAL "Win64")
add_compile_options(-Zi)
else ("${WINXXBITS}" STREQUAL "Win64")
if (NOT "${WINXXBITS}" STREQUAL "Win64")
# i686 arch requires frame pointer preservation
add_compile_options(-Oy-)
endif ("${WINXXBITS}" STREQUAL "Win64")
link_libraries(dbghelp.lib)
endif (NOT "${WINXXBITS}" STREQUAL "Win64")
add_compile_options(-Zi)
link_libraries(dbghelp.lib /DEBUG)
endif (STACKTRACE)
# Enable Wide characters
add_definitions(-DTORRENT_USE_WPATH)
if (NOT QT5)
# Qt4 does not detect it itself
add_definitions(-DQ_COMPILER_INITIALIZER_LISTS)
endif (NOT QT5)
include(MacroConfigureMSVCRuntime)
set(MSVC_RUNTIME "dynamic")
configure_msvc_runtime()