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):
self.copy(pattern="*.dll", dst="bin", src="bin")
self.copy(pattern="*.dylib*", 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):
cmake = CMake(self.settings)
......
......@@ -102,15 +102,18 @@ cpack_add_component(ogs_docs
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
foreach(PATTERN "*.dll" "*.dylib")
file(GLOB MATCHED_FILES ${EXECUTABLE_OUTPUT_PATH}/${PATTERN})
# message(STATUS ${MATCHED_FILES})
install(FILES ${MATCHED_FILES} DESTINATION bin)
endforeach()
# macOS frameworks are directories, exclude header files
file(GLOB MATCHED_DIRECTORIES "${EXECUTABLE_OUTPUT_PATH}/*.framework")
install(DIRECTORY ${MATCHED_DIRECTORIES} DESTINATION bin
PATTERN "Headers" EXCLUDE)
# macOS frameworks are directories, exclude header files
file(GLOB MATCHED_DIRECTORIES "${EXECUTABLE_OUTPUT_PATH}/*.framework")
install(DIRECTORY ${MATCHED_DIRECTORIES} DESTINATION bin
PATTERN "Headers" EXCLUDE)
# Install Qt platform shared libraries
install(DIRECTORY ${EXECUTABLE_OUTPUT_PATH}/platforms DESTINATION bin OPTIONAL)
endif()
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