Skip to content

Commit

Permalink
Merge pull request equinor#33 from joakim-hove/cmake-config
Browse files Browse the repository at this point in the history
Added libecl-config file.
  • Loading branch information
joakim-hove authored May 4, 2017
2 parents b5b6497 + d4f4c98 commit 189fe99
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,10 @@ if (BUILD_PYTHON)
endif()
endif()
configure_file( cmake/libecl-config.cmake.in libecl-config.cmake @ONLY)
configure_file( cmake/libecl-config-version.cmake.in libecl-config-version.cmake @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libecl-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/libecl-config-version.cmake
DESTINATION lib/libecl )
12 changes: 12 additions & 0 deletions cmake/libecl-config-version.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set(PACKAGE_VERSION @ERT_VERSION_MAJOR@.@ERT_VERSION_MINOR@.@ERT_VERSION_PATCH@)
set(PACKAGE_VERSION_MAJOR @ERT_VERSION_MAJOR@)
set(PACKAGE_VERSION_MINOR @ERT_VERSION_MINOR@
set(PACKAGE_VERSION_PATCH @ERT_VERSION_MICRO@)

set(libecl_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include)
set(libecl_LIBRARIES -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lecl_well -lecl -lgeo -lutil)

set( CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules ${CMAKE_MODULE_PATH})
if (@BUILD_PYTHON@)
set(libecl_PYTHONPATH @CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_PREFIX@ )
endif()
8 changes: 8 additions & 0 deletions cmake/libecl-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(libecl_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include)
set(libecl_LIBRARIES -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lecl_well -lecl -lgeo -lutil)

set( CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules ${CMAKE_MODULE_PATH})

if (@BUILD_PYTHON@)
set(libecl_PYTHONPATH @CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_PREFIX@ )
endif()

0 comments on commit 189fe99

Please sign in to comment.