move installation of man pages into install hook

This commit is contained in:
Arne Morten Kvarving committed 2026-02-06 14:35:57 +01:00
1 parent a2889cc2c0
commit 2a35f0ab68
1 file changed
+11 -7
+11 -7
View File
@@ -11,13 +11,9 @@
# #
###########################################################################
# Mandatory call to project
cmake_minimum_required (VERSION 3.23)
project(opm-simulators C CXX)
option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON)
option(BUILD_FLOW "Build the production oriented flow simulator?" ON)
option(BUILD_FLOW_VARIANTS "Build the variants for flow by default?" OFF)
@@ -157,6 +153,17 @@ macro(opm-simulators_tests_hook)
endif()
endmacro()
macro(opm-simulators_install_hook)
install(
DIRECTORY
doc/man1
DESTINATION
${CMAKE_INSTALL_MANDIR}
FILES_MATCHING PATTERN
"*.1"
)
endmacro()
# Ensure OPM_COMPILE_COMPONENTS is a list of at least one element
if(OPM_COMPILE_COMPONENTS STREQUAL "")
message(FATAL_ERROR "OPM_COMPILE_COMPONENTS must contain at least one component.")
@@ -822,6 +829,3 @@ endif()
if(USE_DAMARIS_LIB AND Damaris_FOUND)
target_link_libraries(opmsimulators PUBLIC damaris)
endif()
install(DIRECTORY doc/man1 DESTINATION ${CMAKE_INSTALL_MANDIR}
FILES_MATCHING PATTERN "*.1")