Make packaged build working
This commit is contained in:
parent
652bbaf002
commit
1db22f3663
15 changed files with 547 additions and 422 deletions
2
external/crash_reports/CMakeLists.txt
vendored
2
external/crash_reports/CMakeLists.txt
vendored
|
|
@ -7,6 +7,7 @@
|
||||||
add_library(external_crash_reports INTERFACE IMPORTED GLOBAL)
|
add_library(external_crash_reports INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_crash_reports ALIAS external_crash_reports)
|
add_library(desktop-app::external_crash_reports ALIAS external_crash_reports)
|
||||||
|
|
||||||
|
if (NOT DESKTOP_APP_DISABLE_CRASH_REPORTS)
|
||||||
if (WIN32 OR LINUX OR build_macstore)
|
if (WIN32 OR LINUX OR build_macstore)
|
||||||
add_subdirectory(breakpad)
|
add_subdirectory(breakpad)
|
||||||
target_link_libraries(external_crash_reports
|
target_link_libraries(external_crash_reports
|
||||||
|
|
@ -20,3 +21,4 @@ else()
|
||||||
desktop-app::external_crashpad
|
desktop-app::external_crashpad
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
|
||||||
26
external/ffmpeg/CMakeLists.txt
vendored
26
external/ffmpeg/CMakeLists.txt
vendored
|
|
@ -7,6 +7,31 @@
|
||||||
add_library(external_ffmpeg INTERFACE IMPORTED GLOBAL)
|
add_library(external_ffmpeg INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_ffmpeg ALIAS external_ffmpeg)
|
add_library(desktop-app::external_ffmpeg ALIAS external_ffmpeg)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
|
||||||
|
pkg_check_modules(AVCODEC REQUIRED libavcodec)
|
||||||
|
pkg_check_modules(AVFORMAT REQUIRED libavformat)
|
||||||
|
pkg_check_modules(AVUTIL REQUIRED libavutil)
|
||||||
|
pkg_check_modules(SWSCALE REQUIRED libswscale)
|
||||||
|
pkg_check_modules(SWRESAMPLE REQUIRED libswresample)
|
||||||
|
|
||||||
|
target_include_directories(external_ffmpeg
|
||||||
|
INTERFACE
|
||||||
|
${AVCODEC_INCLUDE_DIRS}
|
||||||
|
${AVFORMAT_INCLUDE_DIRS}
|
||||||
|
${AVUTIL_INCLUDE_DIRS}
|
||||||
|
${SWSCALE_INCLUDE_DIRS}
|
||||||
|
${SWRESAMPLE_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
target_link_libraries(external_ffmpeg
|
||||||
|
INTERFACE
|
||||||
|
${AVCODEC_LIBRARIES}
|
||||||
|
${AVFORMAT_LIBRARIES}
|
||||||
|
${AVUTIL_LIBRARIES}
|
||||||
|
${SWSCALE_LIBRARIES}
|
||||||
|
${SWRESAMPLE_LIBRARIES})
|
||||||
|
else()
|
||||||
target_include_directories(external_ffmpeg SYSTEM
|
target_include_directories(external_ffmpeg SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${libs_loc}/ffmpeg
|
${libs_loc}/ffmpeg
|
||||||
|
|
@ -36,3 +61,4 @@ if (LINUX)
|
||||||
Xrender
|
Xrender
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
|
||||||
11
external/lz4/CMakeLists.txt
vendored
11
external/lz4/CMakeLists.txt
vendored
|
|
@ -4,6 +4,16 @@
|
||||||
# For license and copyright information please follow this link:
|
# For license and copyright information please follow this link:
|
||||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
add_library(external_lz4 INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_lz4 ALIAS external_lz4)
|
||||||
|
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(LZ4 REQUIRED liblz4)
|
||||||
|
|
||||||
|
target_include_directories(external_lz4 INTERFACE ${LZ4_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(external_lz4 INTERFACE ${LZ4_LIBRARIES})
|
||||||
|
else()
|
||||||
add_library(external_lz4 OBJECT)
|
add_library(external_lz4 OBJECT)
|
||||||
add_library(desktop-app::external_lz4 ALIAS external_lz4)
|
add_library(desktop-app::external_lz4 ALIAS external_lz4)
|
||||||
init_target(external_lz4 "(external)")
|
init_target(external_lz4 "(external)")
|
||||||
|
|
@ -27,3 +37,4 @@ target_include_directories(external_lz4
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${lz4_loc}
|
${lz4_loc}
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
12
external/openal/CMakeLists.txt
vendored
12
external/openal/CMakeLists.txt
vendored
|
|
@ -7,7 +7,11 @@
|
||||||
add_library(external_openal INTERFACE IMPORTED GLOBAL)
|
add_library(external_openal INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_openal ALIAS external_openal)
|
add_library(desktop-app::external_openal ALIAS external_openal)
|
||||||
|
|
||||||
if (WIN32)
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(OpenAL REQUIRED)
|
||||||
|
target_include_directories(external_openal INTERFACE ${OPENAL_INCLUDE_DIR})
|
||||||
|
target_link_libraries(external_openal INTERFACE ${OPENAL_LIBRARY})
|
||||||
|
elseif (WIN32)
|
||||||
target_include_directories(external_openal SYSTEM
|
target_include_directories(external_openal SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${libs_loc}/openal-soft/include
|
${libs_loc}/openal-soft/include
|
||||||
|
|
@ -36,8 +40,14 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
target_compile_definitions(external_openal
|
target_compile_definitions(external_openal
|
||||||
INTERFACE
|
INTERFACE
|
||||||
AL_LIBTYPE_STATIC
|
AL_LIBTYPE_STATIC
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(external_openal
|
||||||
|
INTERFACE
|
||||||
AL_ALEXT_PROTOTYPES
|
AL_ALEXT_PROTOTYPES
|
||||||
)
|
)
|
||||||
|
|
|
||||||
5
external/openssl/CMakeLists.txt
vendored
5
external/openssl/CMakeLists.txt
vendored
|
|
@ -7,6 +7,10 @@
|
||||||
add_library(external_openssl INTERFACE IMPORTED GLOBAL)
|
add_library(external_openssl INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_openssl ALIAS external_openssl)
|
add_library(desktop-app::external_openssl ALIAS external_openssl)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
|
target_link_libraries(external_openssl INTERFACE OpenSSL::SSL)
|
||||||
|
else()
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
target_include_directories(external_openssl SYSTEM
|
target_include_directories(external_openssl SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
@ -56,3 +60,4 @@ if (LINUX)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(external_openssl INTERFACE pthread)
|
target_link_libraries(external_openssl INTERFACE pthread)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
|
||||||
11
external/opus/CMakeLists.txt
vendored
11
external/opus/CMakeLists.txt
vendored
|
|
@ -7,12 +7,21 @@
|
||||||
add_library(external_opus INTERFACE IMPORTED GLOBAL)
|
add_library(external_opus INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_opus ALIAS external_opus)
|
add_library(desktop-app::external_opus ALIAS external_opus)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(OPUS opus)
|
||||||
|
|
||||||
|
target_include_directories(external_opus INTERFACE ${OPUS_INCLUDE_DIRS})
|
||||||
|
else()
|
||||||
target_include_directories(external_opus SYSTEM
|
target_include_directories(external_opus SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${libs_loc}/opus/include
|
${libs_loc}/opus/include
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
target_link_libraries(external_opus INTERFACE ${OPUS_LIBRARIES})
|
||||||
|
elseif (WIN32)
|
||||||
set(opus_lib_loc ${libs_loc}/opus/win32/VS2015/Win32/$<IF:$<CONFIG:Debug>,Debug,Release>)
|
set(opus_lib_loc ${libs_loc}/opus/win32/VS2015/Win32/$<IF:$<CONFIG:Debug>,Debug,Release>)
|
||||||
|
|
||||||
target_link_libraries(external_opus
|
target_link_libraries(external_opus
|
||||||
|
|
|
||||||
15
external/qt/CMakeLists.txt
vendored
15
external/qt/CMakeLists.txt
vendored
|
|
@ -15,6 +15,20 @@ if (LINUX)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
Qt5::Core
|
||||||
|
Qt5::Gui
|
||||||
|
Qt5::Widgets
|
||||||
|
Qt5::Network
|
||||||
|
Qt5::DBus)
|
||||||
|
|
||||||
|
target_include_directories(external_qt
|
||||||
|
INTERFACE
|
||||||
|
${Qt5Core_PRIVATE_INCLUDE_DIRS}
|
||||||
|
${Qt5Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
|
else()
|
||||||
target_include_directories(external_qt SYSTEM
|
target_include_directories(external_qt SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${qt_loc}/include
|
${qt_loc}/include
|
||||||
|
|
@ -215,3 +229,4 @@ if (LINUX)
|
||||||
pthread
|
pthread
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
|
||||||
2
external/qt/package.cmake
vendored
2
external/qt/package.cmake
vendored
|
|
@ -4,6 +4,7 @@
|
||||||
# For license and copyright information please follow this link:
|
# For license and copyright information please follow this link:
|
||||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
|
|
||||||
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
if (NOT APPLE OR NOT build_osx)
|
if (NOT APPLE OR NOT build_osx)
|
||||||
set(qt_version 5.12.5)
|
set(qt_version 5.12.5)
|
||||||
else()
|
else()
|
||||||
|
|
@ -17,6 +18,7 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(Qt5_DIR ${qt_loc}/lib/cmake/Qt5)
|
set(Qt5_DIR ${qt_loc}/lib/cmake/Qt5)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
|
find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
|
||||||
|
|
||||||
|
|
|
||||||
4
external/ranges/CMakeLists.txt
vendored
4
external/ranges/CMakeLists.txt
vendored
|
|
@ -7,10 +7,14 @@
|
||||||
add_library(external_ranges INTERFACE IMPORTED GLOBAL)
|
add_library(external_ranges INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_ranges ALIAS external_ranges)
|
add_library(desktop-app::external_ranges ALIAS external_ranges)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(range-v3 REQUIRED)
|
||||||
|
else()
|
||||||
target_include_directories(external_ranges SYSTEM
|
target_include_directories(external_ranges SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${libs_loc}/range-v3/include
|
${libs_loc}/range-v3/include
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_compile_options(external_ranges
|
target_compile_options(external_ranges
|
||||||
|
|
|
||||||
8
external/rlottie/CMakeLists.txt
vendored
8
external/rlottie/CMakeLists.txt
vendored
|
|
@ -4,6 +4,13 @@
|
||||||
# For license and copyright information please follow this link:
|
# For license and copyright information please follow this link:
|
||||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED_RLOTTIE)
|
||||||
|
add_library(external_rlottie INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_rlottie ALIAS external_rlottie)
|
||||||
|
|
||||||
|
find_package(rlottie REQUIRED)
|
||||||
|
target_link_libraries(external_rlottie INTERFACE rlottie::rlottie)
|
||||||
|
else()
|
||||||
add_library(external_rlottie OBJECT)
|
add_library(external_rlottie OBJECT)
|
||||||
add_library(desktop-app::external_rlottie ALIAS external_rlottie)
|
add_library(desktop-app::external_rlottie ALIAS external_rlottie)
|
||||||
init_target(external_rlottie "(external)")
|
init_target(external_rlottie "(external)")
|
||||||
|
|
@ -116,3 +123,4 @@ if (WIN32)
|
||||||
/w44251 # needs to have dll-interface to be used by clients of class
|
/w44251 # needs to have dll-interface to be used by clients of class
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
|
||||||
8
external/xxhash/CMakeLists.txt
vendored
8
external/xxhash/CMakeLists.txt
vendored
|
|
@ -7,6 +7,13 @@
|
||||||
add_library(external_xxhash INTERFACE IMPORTED GLOBAL)
|
add_library(external_xxhash INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_xxhash ALIAS external_xxhash)
|
add_library(desktop-app::external_xxhash ALIAS external_xxhash)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_library(XXHASH_LIBRARY xxhash)
|
||||||
|
find_path(XXHASH_INCLUDE_DIRS xxhash.h)
|
||||||
|
|
||||||
|
target_include_directories(external_xxhash INTERFACE ${XXHASH_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(external_xxhash INTERFACE ${XXHASH_LIBRARY})
|
||||||
|
else()
|
||||||
target_include_directories(external_xxhash SYSTEM
|
target_include_directories(external_xxhash SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${third_party_loc}/xxHash
|
${third_party_loc}/xxHash
|
||||||
|
|
@ -16,3 +23,4 @@ target_compile_definitions(external_xxhash
|
||||||
INTERFACE
|
INTERFACE
|
||||||
XXH_INLINE_ALL
|
XXH_INLINE_ALL
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
18
external/zlib/CMakeLists.txt
vendored
18
external/zlib/CMakeLists.txt
vendored
|
|
@ -7,7 +7,16 @@
|
||||||
add_library(external_zlib INTERFACE IMPORTED GLOBAL)
|
add_library(external_zlib INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_zlib ALIAS external_zlib)
|
add_library(desktop-app::external_zlib ALIAS external_zlib)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
add_library(external_minizip INTERFACE IMPORTED)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(MINIZIP REQUIRED minizip)
|
||||||
|
|
||||||
|
target_include_directories(external_minizip INTERFACE ${MINIZIP_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(external_minizip INTERFACE ${MINIZIP_LIBRARIES})
|
||||||
|
|
||||||
|
target_link_libraries(external_zlib INTERFACE external_minizip)
|
||||||
|
elseif (NOT WIN32)
|
||||||
add_library(external_minizip STATIC)
|
add_library(external_minizip STATIC)
|
||||||
init_target(external_minizip "(external)")
|
init_target(external_minizip "(external)")
|
||||||
|
|
||||||
|
|
@ -32,13 +41,18 @@ if (NOT WIN32)
|
||||||
target_link_libraries(external_zlib INTERFACE external_minizip)
|
target_link_libraries(external_zlib INTERFACE external_minizip)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
target_include_directories(external_zlib SYSTEM
|
target_include_directories(external_zlib SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${libs_loc}/zlib
|
${libs_loc}/zlib
|
||||||
${libs_loc}/zlib/contrib/minizip
|
${libs_loc}/zlib/contrib/minizip
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
target_link_libraries(external_zlib INTERFACE ZLIB::ZLIB)
|
||||||
|
elseif (WIN32)
|
||||||
target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
|
target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
|
||||||
|
|
||||||
set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/x86/ZlibStat$<IF:$<CONFIG:Debug>,Debug,ReleaseWithoutAsm>)
|
set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/x86/ZlibStat$<IF:$<CONFIG:Debug>,Debug,ReleaseWithoutAsm>)
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,10 @@ function(init_target target_name) # init_target(my_target folder_name)
|
||||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(${target_name} PUBLIC desktop-app::common_options)
|
target_link_libraries(${target_name} PUBLIC desktop-app::common_options)
|
||||||
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
|
set_target_properties(${target_name} PROPERTIES LINK_SEARCH_START_STATIC 1)
|
||||||
|
endif()
|
||||||
set_target_properties(${target_name} PROPERTIES
|
set_target_properties(${target_name} PROPERTIES
|
||||||
LINK_SEARCH_START_STATIC 1
|
|
||||||
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_WEAK YES
|
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_WEAK YES
|
||||||
XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN YES
|
XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN YES
|
||||||
XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES
|
XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,9 @@
|
||||||
|
|
||||||
target_compile_options(common_options
|
target_compile_options(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<IF:$<CONFIG:Debug>,,-Ofast -fno-strict-aliasing>
|
$<IF:$<CONFIG:Debug>,,-fno-strict-aliasing>
|
||||||
-pipe
|
-pipe
|
||||||
-Wall
|
-Wall
|
||||||
-Werror
|
|
||||||
-W
|
-W
|
||||||
-fPIC
|
-fPIC
|
||||||
-Wno-unused-variable
|
-Wno-unused-variable
|
||||||
|
|
@ -26,14 +25,21 @@ INTERFACE
|
||||||
-Wno-maybe-uninitialized
|
-Wno-maybe-uninitialized
|
||||||
-Wno-error=class-memaccess
|
-Wno-error=class-memaccess
|
||||||
)
|
)
|
||||||
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
|
target_compile_options(common_options
|
||||||
|
INTERFACE
|
||||||
|
$<IF:$<CONFIG:Debug>,,-Ofast>
|
||||||
|
-Werror
|
||||||
|
)
|
||||||
target_link_options(common_options
|
target_link_options(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<IF:$<CONFIG:Debug>,,-Ofast>
|
$<IF:$<CONFIG:Debug>,,-Ofast>
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
if (build_linux32)
|
if (build_linux32)
|
||||||
target_compile_options(common_options INTERFACE -g0)
|
target_compile_options(common_options INTERFACE -g0)
|
||||||
target_link_options(common_options INTERFACE -g0)
|
target_link_options(common_options INTERFACE -g0)
|
||||||
else()
|
elseif (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
target_compile_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto>)
|
target_compile_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto>)
|
||||||
target_link_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto -fuse-linker-plugin>)
|
target_link_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto -fuse-linker-plugin>)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." OFF)
|
||||||
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
|
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
|
||||||
option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
|
option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
|
||||||
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ON)
|
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ON)
|
||||||
|
option(DESKTOP_APP_USE_PACKAGED_RLOTTIE "Find rlottie using CMake instead of bundled one." ${DESKTOP_APP_USE_PACKAGED})
|
||||||
|
|
||||||
function(report_bad_special_target)
|
function(report_bad_special_target)
|
||||||
message(FATAL_ERROR "Bad special target '${DESKTOP_APP_SPECIAL_TARGET}'")
|
message(FATAL_ERROR "Bad special target '${DESKTOP_APP_SPECIAL_TARGET}'")
|
||||||
|
|
@ -74,10 +75,12 @@ else()
|
||||||
elseif (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "")
|
elseif (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "")
|
||||||
report_bad_special_target()
|
report_bad_special_target()
|
||||||
endif()
|
endif()
|
||||||
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
set(CMAKE_AR /usr/bin/gcc-ar)
|
set(CMAKE_AR /usr/bin/gcc-ar)
|
||||||
set(CMAKE_RANLIB /usr/bin/gcc-ranlib)
|
set(CMAKE_RANLIB /usr/bin/gcc-ranlib)
|
||||||
set(CMAKE_NM /usr/bin/gcc-nm)
|
set(CMAKE_NM /usr/bin/gcc-nm)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT APPLE OR build_osx)
|
if (NOT APPLE OR build_osx)
|
||||||
get_filename_component(libs_loc "../Libraries" REALPATH)
|
get_filename_component(libs_loc "../Libraries" REALPATH)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue