Skip to content
Snippets Groups Projects
Commit 89879b51 authored by Markus Blatt's avatar Markus Blatt
Browse files

[Merge][CMake] Merged revisions : 6643

Revision  r6643
.----------------------
Added preliminary package configuration files.

.----------------------


[[Imported from SVN: r7180]]
parents 4614275e 696d98af
No related branches found
No related tags found
No related merge requests found
......@@ -148,6 +148,15 @@ configure_file(
@ONLY
)
#create cmake-config files
configure_file(
${PROJECT_SOURCE_DIR}/${DUNE_MOD_NAME}-config.cmake.in
${PROJECT_BINARY_DIR}/${DUNE_MOD_NAME}-config.cmake @ONLY)
configure_file(
${PROJECT_SOURCE_DIR}/${DUNE_MOD_NAME}-version.cmake.in
${PROJECT_BINARY_DIR}/${DUNE_MOD_NAME}-version.cmake @ONLY)
#install dune.module file
install(FILES dune.module DESTINATION lib/dunecontrol/${DUNE_MOD_NAME})
# install pkgconfig file
......@@ -156,5 +165,10 @@ if(PKG_CONFIG_FOUND )
DESTINATION lib/pkgconfig)
endif(PKG_CONFIG_FOUND)
#install cmake-config files
install(FILES ${PROJECT_BINARY_DIR}/${DUNE_MOD_NAME}-config.cmake
${PROJECT_BINARY_DIR}/${DUNE_MOD_NAME}-version.cmake
DESTINATION lib/cmake)
include(CTest)
#compute installation prefix relative to this file
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_prefix "${_dir}/../.." ABSOLUTE)
#import the target
include("${_prefix}/lib/cmake/@DUNE_MOD_NAME@-targets.cmake")
#report other information
set(dune-common_INCLUDE_DIRS "${_prefix}/include")
\ No newline at end of file
set(PACKAGE_VERSION "@DUNE_MOD_VERSION@")
if(NOT "${PACKAGE_FIND_VERSION}" VERSION_GREATER "@DUNE_MOD_VERSION@")
set (PACKAGE_VERSION_COMPATIBLE 1) # compatible with older
if ("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@DUNE_MOD_VERSION@")
set(PACKAGE_VERSION_EXACT 1) #exact match for this version
endif()
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