mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 15:12:32 -06:00
@@ -101,31 +101,6 @@ endif()
|
||||
# Additional feature dependent configuration
|
||||
# -----------------------------------------------------------------------------
|
||||
# -----------------------------------------------------------------------------
|
||||
if (STACKTRACE)
|
||||
target_compile_definitions(qbt_app PRIVATE STACKTRACE)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_sources(qbt_app PRIVATE stacktrace_win.h)
|
||||
|
||||
# i686 arch on Windows requires frame pointer preservation
|
||||
if (MSVC)
|
||||
target_compile_options(qbt_app PRIVATE /Zi)
|
||||
target_link_options(qbt_app PUBLIC LINKER:/DEBUG)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
target_compile_options(qbt_app PRIVATE /Oy)
|
||||
endif()
|
||||
else()
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
target_compile_options(qbt_app PRIVATE -fno-omit-frame-pointer)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(qbt_app PUBLIC dbghelp)
|
||||
else()
|
||||
target_sources(qbt_app PRIVATE stacktrace.h)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (GUI)
|
||||
target_link_libraries(qbt_app PRIVATE qbt_gui)
|
||||
if ((CMAKE_SYSTEM_NAME STREQUAL "Windows") OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
|
||||
@@ -133,6 +108,41 @@ if (GUI)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (STACKTRACE)
|
||||
target_compile_definitions(qbt_app PRIVATE STACKTRACE)
|
||||
|
||||
target_sources(qbt_app PRIVATE
|
||||
stacktrace.h
|
||||
stacktrace.cpp
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
target_compile_definitions(qbt_app PRIVATE BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED)
|
||||
target_link_options(qbt_app PUBLIC -rdynamic)
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(qbt_app PUBLIC ${CMAKE_DL_LIBS})
|
||||
target_link_options(qbt_app PUBLIC -rdynamic)
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if (MSVC)
|
||||
target_compile_options(qbt_app PRIVATE /Zi)
|
||||
target_link_options(qbt_app PUBLIC
|
||||
/DEBUG
|
||||
/PDBALTPATH:$<TARGET_PDB_FILE_NAME:qbt_app>
|
||||
)
|
||||
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
target_compile_options(qbt_app PRIVATE /Oy-)
|
||||
endif()
|
||||
else()
|
||||
target_link_options(qbt_app PUBLIC LINKER:--export-dynamic)
|
||||
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
target_compile_options(qbt_app PRIVATE -fno-omit-frame-pointer)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WEBUI)
|
||||
target_sources(qbt_app PRIVATE
|
||||
${QBT_WEBUI_QM_FILES}
|
||||
|
||||
Reference in New Issue
Block a user