#1748 libecl : Add INSTALL_ERT to control install targets

This commit is contained in:
Magne Sjaastad 2017-08-08 11:23:30 +02:00
parent 7e316edf17
commit 19be1c09a4
2 changed files with 28 additions and 23 deletions

View File

@ -357,6 +357,9 @@ if (BUILD_PYTHON)
endif() endif()
endif() endif()
if (INSTALL_ERT)
install(EXPORT ecl-config DESTINATION share/cmake/ecl) install(EXPORT ecl-config DESTINATION share/cmake/ecl)
endif()
export(TARGETS ecl FILE eclConfig.cmake) export(TARGETS ecl FILE eclConfig.cmake)
export(PACKAGE ecl) export(PACKAGE ecl)

View File

@ -215,6 +215,7 @@ set_target_properties(ecl PROPERTIES
VERSION ${ECL_VERSION_MAJOR}.${ECL_VERSION_MINOR} VERSION ${ECL_VERSION_MAJOR}.${ECL_VERSION_MINOR}
SOVERSION ${ECL_VERSION_MAJOR}) SOVERSION ${ECL_VERSION_MAJOR})
if (INSTALL_ERT)
install(TARGETS ecl install(TARGETS ecl
EXPORT ecl-config EXPORT ecl-config
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
@ -239,6 +240,7 @@ if (ERT_BUILD_CXX)
PATTERN *.hpp PATTERN *.hpp
) )
endif () endif ()
endif()
if (NOT BUILD_TESTS) if (NOT BUILD_TESTS)
return () return ()