forked from OPM/opm-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopm-core-config.cmake.in
37 lines (31 loc) · 1.72 KB
/
opm-core-config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# - Open Porous Media Initiative Core Library config mode
#
# Defines the following variables:
# opm-core_FOUND - true
# opm-core_VERSION - version of the opm-core library found, e.g. 0.2
# opm-core_DEFINITIONS - defines to be made on the command line
# opm-core_INCLUDE_DIRS - header directories with which to compile
# opm-core_LINKER_FLAGS - flags that must be passed to the linker
# opm-core_LIBRARIES - names of the libraries with which to link
# opm-core_LIBRARY_DIRS - directories in which the libraries are situated
#
# You should put lines like this in your CMakeLists.txt
# set (opm-core_DIR "${PROJECT_BINARY_DIR}/../opm-core" CACHE LOCATION "Build tree of opm-core")
# find_package (opm-core)
# <http://www.vtk.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file>
# propagate this property from one build system to the other
set (opm-core_VERSION @PACKAGE_VERSION@)
# make the pkg-config portion of the configuration do the heavy lifting
find_package (PkgConfig)
set (ENV{PKG_CONFIG_PATH} "@abs_top_builddir@:$ENV{PKG_CONFIG_PATH}")
pkg_check_modules (opm-core REQUIRED opm-core)
# these variables have non-standard names in FindPkgConfig (sic)
set (opm-core_DEFINITIONS ${opm-core_CFLAGS_OTHER})
set (opm-core_LINKER_FLAGS ${opm-core_LDFLAGS_OTHER})
# libraries come from the build tree where this file was generated
find_library (opm-core_LOCATION NAMES "opmcore" PATHS "@abs_top_builddir@/lib/.libs")
mark_as_advanced (opm-core_LOCATION)
# add the library as a target, so that other things in the project including
# this file may depend on it and get rebuild if this library changes.
add_library (opmcore UNKNOWN IMPORTED)
set_property (TARGET opmcore PROPERTY IMPORTED_LOCATION "${opm-core_LOCATION}")