Skip to content
Snippets Groups Projects
Commit 114e4c79 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Install qt platform shared libraries with Conan.

parent 7e545936
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,8 @@ class OpenGeoSysConan(ConanFile): ...@@ -22,6 +22,8 @@ class OpenGeoSysConan(ConanFile):
self.copy(pattern="*.dll", dst="bin", src="bin") self.copy(pattern="*.dll", dst="bin", src="bin")
self.copy(pattern="*.dylib*", dst="bin", src="lib") self.copy(pattern="*.dylib*", dst="bin", src="lib")
self.copy(pattern="*.framework*", dst="bin", src="lib") self.copy(pattern="*.framework*", dst="bin", src="lib")
self.copy(pattern="*.dll", dst="bin/platforms", src="plugins/platforms")
self.copy(pattern="*.dylib*", dst="bin/platforms", src="plugins/platforms")
def build(self): def build(self):
cmake = CMake(self.settings) cmake = CMake(self.settings)
......
...@@ -102,15 +102,18 @@ cpack_add_component(ogs_docs ...@@ -102,15 +102,18 @@ cpack_add_component(ogs_docs
GROUP Utilities GROUP Utilities
) )
if(USE_CONAN)
# Install shared libraries, copied to bin-dir
foreach(PATTERN "*.dll" "*.dylib")
file(GLOB MATCHED_FILES ${EXECUTABLE_OUTPUT_PATH}/${PATTERN})
install(FILES ${MATCHED_FILES} DESTINATION bin)
endforeach()
# Install shared libraries, copied to bin-dir from e.g Conan # macOS frameworks are directories, exclude header files
foreach(PATTERN "*.dll" "*.dylib") file(GLOB MATCHED_DIRECTORIES "${EXECUTABLE_OUTPUT_PATH}/*.framework")
file(GLOB MATCHED_FILES ${EXECUTABLE_OUTPUT_PATH}/${PATTERN}) install(DIRECTORY ${MATCHED_DIRECTORIES} DESTINATION bin
# message(STATUS ${MATCHED_FILES}) PATTERN "Headers" EXCLUDE)
install(FILES ${MATCHED_FILES} DESTINATION bin)
endforeach()
# macOS frameworks are directories, exclude header files # Install Qt platform shared libraries
file(GLOB MATCHED_DIRECTORIES "${EXECUTABLE_OUTPUT_PATH}/*.framework") install(DIRECTORY ${EXECUTABLE_OUTPUT_PATH}/platforms DESTINATION bin OPTIONAL)
install(DIRECTORY ${MATCHED_DIRECTORIES} DESTINATION bin endif()
PATTERN "Headers" EXCLUDE)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment