aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-28 18:09:15 +0000
committersaturneric <[email protected]>2024-07-28 18:09:15 +0000
commitaee8017b529d0ad5cf057a1e76cea8b95f48630a (patch)
tree3ceeb587f97d1d4297c6ff16eb5bda82925bfc50
parentfix: remove libs from install lists at app build only mode (diff)
downloadGpgFrontend-aee8017b529d0ad5cf057a1e76cea8b95f48630a.tar.gz
GpgFrontend-aee8017b529d0ad5cf057a1e76cea8b95f48630a.zip
fix: must install all headers of test, ui and core and set include path properly
-rw-r--r--src/CMakeLists.txt23
-rw-r--r--src/ui/CMakeLists.txt10
2 files changed, 25 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e08c9c87..bff395ff 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -406,7 +406,7 @@ if (BUILD_APPLICATION)
endif ()
if(STABLE_BUILD_ONLY_APPLICATION)
- target_include_directories(${AppName} PUBLIC "${CMAKE_SOURCE_DIR}/src")
+ target_include_directories(${AppName} PUBLIC "${CMAKE_INSTALL_INCLUDEDIR}/gpgfrontend")
if(GPGFRONTEND_QT5_BUILD)
target_link_libraries(${AppName} Qt5::Core Qt5::Widgets)
@@ -495,7 +495,7 @@ endif()
# if building linux package
if (LINUX AND LINUX_INSTALL_SOFTWARE)
include(GNUInstallDirs)
-
+
if(STABLE_BUILD_ONLY_APPLICATION)
set(GPGFRONTEND_INSTALL_LIBRARIES "")
else()
@@ -544,6 +544,7 @@ endif ()
# if build full sdk
if (STABLE_BUILD_FULL_SDK)
include(GNUInstallDirs)
+
set(GPGFRONTEND_SDK_INSTALL_LIBRARIES
mimalloc
gpgfrontend_core
@@ -557,4 +558,22 @@ if (STABLE_BUILD_FULL_SDK)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/core"
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/gpgfrontend"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ui"
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/gpgfrontend"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test"
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/gpgfrontend"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
endif () \ No newline at end of file
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 0363f3bd..4dcaf73f 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -23,7 +23,6 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
-
# tracking source files
aux_source_directory(. UI_SOURCE)
aux_source_directory(dialog/keypair_details UI_SOURCE)
@@ -59,11 +58,10 @@ if(GPGFRONTEND_QT5_BUILD)
Qt5::Core Qt5::Widgets Qt5::Network Qt5::PrintSupport)
else()
# link Qt
- target_link_libraries(gpgfrontend_ui
+ target_link_libraries(gpgfrontend_ui
Qt6::Core Qt6::Widgets Qt6::Network Qt6::PrintSupport)
endif()
-
# link gpgfrontend_core
target_link_libraries(gpgfrontend_ui gpgfrontend_core)
@@ -77,7 +75,7 @@ target_include_directories(gpgfrontend_ui PUBLIC
# using std c++ 17
target_compile_features(gpgfrontend_ui PUBLIC cxx_std_17)
-if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
# lib output path
set_target_properties(gpgfrontend_ui PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib
@@ -85,7 +83,7 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
endif()
# for xcode archive build
-if (XCODE_BUILD)
+if(XCODE_BUILD)
set_target_properties(gpgfrontend_ui
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}
@@ -93,6 +91,6 @@ if (XCODE_BUILD)
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}
XCODE_ATTRIBUTE_SKIP_INSTALL "Yes"
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${GPGFRONTEND_XOCDE_CODE_SIGN_IDENTITY}")
-endif ()
+endif()
target_compile_features(gpgfrontend_ui PUBLIC cxx_std_17) \ No newline at end of file