aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ui/CMakeLists.txt3
-rw-r--r--third_party/CMakeLists.txt12
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 073da46f..f51d02e5 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -34,7 +34,7 @@ target_link_libraries(${GPGFRONTEND_UI_LIB_NAME}
Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core)
# link vmime
target_link_libraries(${GPGFRONTEND_UI_LIB_NAME}
- vmime-static anl ssl crypto)
+ gpgfrontend_vmime anl ssl crypto)
# link easyloggingpp
target_link_libraries(${GPGFRONTEND_UI_LIB_NAME}
easyloggingpp)
@@ -46,6 +46,7 @@ target_link_libraries(${GPGFRONTEND_UI_LIB_NAME}
target_include_directories(gpgfrontend_ui PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/${GPGFRONTEND_UI_LIB_NAME}_autogen/include)
+
if (XCODE_BUILD)
set_target_properties(${GPGFRONTEND_UI_LIB_NAME}
PROPERTIES
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index c8091038..bac7312e 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -15,10 +15,22 @@ add_subdirectory(qt-aes)
# vmime
set(VMIME_HAVE_MESSAGING_PROTO_SENDMAIL OFF CACHE BOOL "" FORCE)
set(VMIME_HAVE_SASL_SUPPORT OFF CACHE BOOL "" FORCE)
+set(VMIME_BUILD_STATIC_LIBRARY ON CACHE BOOL "" FORCE)
set(VMIME_CHARSETCONV_LIB "iconv" CACHE STRING "" FORCE)
set(VMIME_TLS_SUPPORT_LIB "openssl" CACHE STRING "" FORCE)
+
+set(VMIME_DIR ${CMAKE_CURRENT_SOURCE_DIR}/vmime)
+set(VMIME_BIN ${CMAKE_CURRENT_BINARY_DIR}/vmime)
+set(VMIME_BIN_STATIC_LIB ${VMIME_BIN}/build/lib/libvmime.a)
+set(VMIME_INCLUDES ${VMIME_DIR}/src ${CMAKE_BINARY_DIR}/src/vmime/ ${CMAKE_BINARY_DIR}/src/)
+
add_subdirectory(vmime)
+add_library(gpgfrontend_vmime STATIC IMPORTED GLOBAL)
+add_dependencies(gpgfrontend_vmime vmime-static vmime-static-config)
+set_target_properties(gpgfrontend_vmime PROPERTIES IMPORTED_LOCATION ${VMIME_BIN_STATIC_LIB})
+set_target_properties(gpgfrontend_vmime PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${VMIME_INCLUDES}")
+
# gnupg
include(ExternalProject)