dtkConfig.install.cmake.in 4.56 KB
Newer Older
1
## Version: $Id$
2
##
3
######################################################################
4 5 6
##
### Commentary:
##
7
######################################################################
8
##
9
### Change Log:
10
##
11
######################################################################
12
##
13 14
### Code:

15 16 17
set(DTK_BUILD_32 @DTK_BUILD_32@)
set(DTK_BUILD_64 @DTK_BUILD_64@)

18
## ###################################################################
19
##
20 21 22
## ###################################################################

set(dtk_INCLUDE_DIRS
23 24
  "@CMAKE_INSTALL_PREFIX@/include"
  "@CMAKE_INSTALL_PREFIX@/include/dtk"
25
  "@CMAKE_INSTALL_PREFIX@/include/dtkCore"
NICLAUSSE Nicolas's avatar
NICLAUSSE Nicolas committed
26 27
  "@CMAKE_INSTALL_PREFIX@/include/dtkLog"
  "@CMAKE_INSTALL_PREFIX@/include/dtkMath"
28
  "@CMAKE_INSTALL_PREFIX@/include/dtkMeta"
29
  "@CMAKE_INSTALL_PREFIX@/include/dtkTest")
30

31 32 33
set(CMAKE_MODULE_PATH
  ${CMAKE_MODULE_PATH} "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/")

34 35
set(DTK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")

KLOCZKO Thibaud's avatar
KLOCZKO Thibaud committed
36
set(dtk_INSTALL_DOCS "@CMAKE_INSTALL_PREFIX@/doc")
37

Julien Wintz's avatar
Julien Wintz committed
38
set(dtk_WRAP_PREFIX "@CMAKE_INSTALL_PREFIX@/wrp")
KLOCZKO Thibaud's avatar
KLOCZKO Thibaud committed
39

40
include("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkDepends.cmake")
41
include("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkWrap.cmake")
42
set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkSetTestEnvironment.cmake")
43 44 45 46 47

## ###################################################################
## Options
## ###################################################################

48 49
set(DTK_BUILD_DISTRIBUTED @DTK_BUILD_DISTRIBUTED@)
set(DTK_BUILD_COMPOSER @DTK_BUILD_COMPOSER@)
50 51
set(DTK_BUILD_SCRIPT @DTK_BUILD_SCRIPT@)
set(DTK_BUILD_WRAPPERS @DTK_BUILD_WRAPPERS@)
52
set(DTK_BUILD_WIDGETS @DTK_BUILD_WIDGETS@)
53 54 55 56 57 58 59
set(DTK_BUILD_SUPPORT_CORE @DTK_BUILD_SUPPORT_CORE@)
set(DTK_BUILD_SUPPORT_CONTAINER @DTK_BUILD_SUPPORT_CONTAINER@)
set(DTK_BUILD_SUPPORT_COMPOSER @DTK_BUILD_SUPPORT_COMPOSER@)
set(DTK_BUILD_SUPPORT_DISTRIBUTED @DTK_BUILD_SUPPORT_DISTRIBUTED@)
set(DTK_BUILD_SUPPORT_GUI @DTK_BUILD_SUPPORT_GUI@)
set(DTK_BUILD_SUPPORT_MATH @DTK_BUILD_SUPPORT_MATH@)
set(DTK_BUILD_SUPPORT_PLOT @DTK_BUILD_SUPPORT_PLOT@)
60
set(DTK_BUILD_SUPPORT_VR @DTK_BUILD_SUPPORT_VR@)
61
set(DTK_ENABLE_COVERAGE @DTK_ENABLE_COVERAGE@)
62
set(DTK_COVERAGE_USE_COBERTURA @DTK_COVERAGE_USE_COBERTURA@)
63
set(DTK_ENABLE_MEMCHECK @DTK_ENABLE_MEMCHECK@)
64

65
set(DTK_HAVE_MPI @DTK_HAVE_MPI@)
66 67
set(DTK_HAVE_VRPN @DTK_HAVE_VRPN@)
set(DTK_HAVE_NITE @DTK_HAVE_NITE@)
68
set(DTK_HAVE_ZLIB @DTK_HAVE_ZLIB@)
69

70 71 72 73 74
if(DTK_BUILD_DISTRIBUTED)
  set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS} "@CMAKE_INSTALL_PREFIX@/include/dtkDistributed")
  set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS} "@CMAKE_INSTALL_PREFIX@/include/dtkDistributedTest")
endif(DTK_BUILD_DISTRIBUTED)

75
if(DTK_BUILD_COMPOSER)
76
  set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS} "@CMAKE_INSTALL_PREFIX@/include/dtkComposer")
77 78
endif(DTK_BUILD_COMPOSER)

79 80 81 82
if(DTK_BUILD_SCRIPT)
  set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS} "@CMAKE_INSTALL_PREFIX/include/dtkScript")
endif(DTK_BUILD_SCRIPT)

83 84 85 86 87 88
if(DTK_BUILD_WRAPPERS)
  set(DTK_WRAPPING_PYTHON @DTK_WRAPPING_PYTHON@)
  set(DTK_WRAPPING_CSHARP @DTK_WRAPPING_CSHARP@)
  set(DTK_WRAPPING_TCL @DTK_WRAPPING_TCL@)
endif(DTK_BUILD_WRAPPERS)

89
if(DTK_BUILD_WIDGETS)
90
  set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS} "@CMAKE_INSTALL_PREFIX@/include/dtkWidgets")
91 92
endif(DTK_BUILD_WIDGETS)

93 94 95 96 97 98 99 100 101 102 103 104
if(DTK_BUILD_SUPPORT_CORE)
  set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS} "@CMAKE_INSTALL_PREFIX@/include/dtkCoreSupport")
endif(DTK_BUILD_SUPPORT_CORE)

if(DTK_BUILD_SUPPORT_CONTAINER)
  set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS} "@CMAKE_INSTALL_PREFIX@/include/dtkContainerSupport")
endif(DTK_BUILD_SUPPORT_CONTAINER)

if(DTK_BUILD_SUPPORT_MATH)
  set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS} "@CMAKE_INSTALL_PREFIX@/include/dtkMathSupport")
endif(DTK_BUILD_SUPPORT_MATH)

105 106 107 108 109
## ###################################################################
## Always full RPATH
## ###################################################################

include(GNUInstallDirs)
Julien Wintz's avatar
Julien Wintz committed
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" isSystemDir)

message(STATUS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES})

if("${isSystemDir}" STREQUAL "-1")
   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif("${isSystemDir}" STREQUAL "-1")

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

function(PREPEND var prefix)
   set(listVar "")
   foreach(f ${ARGN})
      list(APPEND listVar "${prefix}/${f}")
   endforeach(f)
   set(${var} "${listVar}" PARENT_SCOPE)
endfunction(PREPEND)
128

129 130
######################################################################
### dtkConfig.cmake.in ends here