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

[cmake] Fix packaging.

parent 9faf451f
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,7 @@ include(CompilerSetup)
include(JobPools)
include(Find)
include(CLCacheSetup)
include(packaging/PackagingDependencies)
include(Dependencies)
include(DocumentationSetup)
include(test/Test)
......@@ -188,8 +189,7 @@ option(OGS_USE_MFRONT
OFF
)
# Packaging
include(scripts/cmake/packaging/Pack.cmake)
include(packaging/Pack)
# ---- Subdirectories ----
include_directories(${PROJECT_SOURCE_DIR})
......
......@@ -88,32 +88,3 @@ install(
CODE "execute_process(COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR} -t write-licenses)"
)
install(FILES ${PROJECT_BINARY_DIR}/third_party_licenses.txt TYPE INFO)
# Install dependencies via GET_RUNTIME_DEPENDENCIES. Available since CMake 3.16.
if(${CMAKE_VERSION} VERSION_LESS 3.16 OR NOT OGS_INSTALL_DEPENDENCIES)
return()
endif()
install(
CODE [[
include(GNUInstallDirs)
if(WIN32)
set(INSTALL_DIR ${CMAKE_INSTALL_FULL_BINDIR})
else()
set(INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR})
endif()
file(GET_RUNTIME_DEPENDENCIES
EXECUTABLES $<$<TARGET_EXISTS:ogs>:$<TARGET_FILE:ogs>> $<$<TARGET_EXISTS:DataExplorer>:$<TARGET_FILE:DataExplorer>>
RESOLVED_DEPENDENCIES_VAR _r_deps
UNRESOLVED_DEPENDENCIES_VAR _u_deps
POST_EXCLUDE_REGEXES "/opt/local/lib/lib.*" # Disable macports zlib
)
file(INSTALL ${_r_deps}
DESTINATION ${INSTALL_DIR}
FOLLOW_SYMLINK_CHAIN
)
list(LENGTH _u_deps _u_length)
if("${_u_length}" GREATER 0)
message(WARNING "Unresolved dependencies detected!\n${_u_deps}")
endif()
]]
)
# Install dependencies via GET_RUNTIME_DEPENDENCIES. Available since CMake 3.16.
if(${CMAKE_VERSION} VERSION_LESS 3.16 OR NOT OGS_INSTALL_DEPENDENCIES)
return()
endif()
install(
CODE [[
include(GNUInstallDirs)
if(WIN32)
set(INSTALL_DIR ${CMAKE_INSTALL_FULL_BINDIR})
else()
set(INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR})
endif()
file(GET_RUNTIME_DEPENDENCIES
EXECUTABLES $<$<TARGET_EXISTS:ogs>:$<TARGET_FILE:ogs>> $<$<TARGET_EXISTS:DataExplorer>:$<TARGET_FILE:DataExplorer>>
RESOLVED_DEPENDENCIES_VAR _r_deps
UNRESOLVED_DEPENDENCIES_VAR _u_deps
POST_EXCLUDE_REGEXES "/opt/local/lib/lib.*" # Disable macports zlib
)
file(INSTALL ${_r_deps}
DESTINATION ${INSTALL_DIR}
FOLLOW_SYMLINK_CHAIN
)
list(LENGTH _u_deps _u_length)
if("${_u_length}" GREATER 0)
message(WARNING "Unresolved dependencies detected!\n${_u_deps}")
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