diff options
author | saturneric <[email protected]> | 2024-07-28 17:45:39 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-07-28 17:45:39 +0000 |
commit | 7a552f4d9dc0455b66ea2329bc1cd06a71bc6a79 (patch) | |
tree | c344bf0615bc49f80bb81519810bade0d6ea05ba /src/CMakeLists.txt | |
parent | fix: errors in judgment conditions (diff) | |
download | GpgFrontend-sdk/2.1.3.tar.gz GpgFrontend-sdk/2.1.3.zip |
feat: support more build modesdk/2.1.3
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9b590b7b..a91bc2ea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -405,6 +405,16 @@ if (BUILD_APPLICATION) endif () +if(STABLE_BUILD_ONLY_APPLICATION) + target_include_directories(${AppName} PUBLIC "${CMAKE_SOURCE_DIR}/src") + + if(GPGFRONTEND_QT5_BUILD) + target_link_libraries(${AppName} Qt5::Core Qt5::Widgets) + else() + target_link_libraries(${AppName} Qt6::Core Qt6::Widgets) + endif() +endif() + # link options for GpgFrontend if (BUILD_APPLICATION) target_link_libraries(${AppName} gpgfrontend_ui gpgfrontend_test) @@ -419,6 +429,8 @@ if (BUILD_APPLICATION) endif () endif () + + # add i18n support if (BUILD_APPLICATION) set(LOCALE_TS_PATH ${CMAKE_SOURCE_DIR}/resource/lfs/locale/ts) @@ -509,8 +521,8 @@ if (LINUX AND LINUX_INSTALL_SOFTWARE) DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/) endif () -# if building sdk -if (BUILD_SDK) +# if only build sdk +if (STABLE_BUILD_ONLY_SDK) include(GNUInstallDirs) set(GPGFRONTEND_SDK_INSTALL_LIBRARIES gpgfrontend_module_sdk) @@ -522,3 +534,22 @@ if (BUILD_SDK) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif () + + +# if build full sdk +if (STABLE_BUILD_FULL_SDK) + include(GNUInstallDirs) + set(GPGFRONTEND_SDK_INSTALL_LIBRARIES + mimalloc + gpgfrontend_core + gpgfrontend_ui + gpgfrontend_test + gpgfrontend_module_sdk) + + install(TARGETS ${GPGFRONTEND_SDK_INSTALL_LIBRARIES} + EXPORT GpgFrontendTargets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif ()
\ No newline at end of file |