]> Creatis software - crea.git/blob - cmake/InstallLibraryForCMake_UseLibrary.cmake.in
6865c2ab6fe7b191998af95b0f762ca16d16e2dc
[crea.git] / cmake / InstallLibraryForCMake_UseLibrary.cmake.in
1 # This is an implementation detail for using @LIBRARY_NAME@ with the
2 # Find@LIBRARY_NAME@.cmake module.  Do not include directly by name.  
3 # This should be included only when Find@LIBRARY_NAME@.cmake sets 
4 # the @LIBRARY_NAME@_USE_FILE variable to point here.
5
6 IF(CREA_VERBOSE_CMAKE)
7   MESSAGE(STATUS "Using @LIBRARY_NAME@")
8 ENDIF(CREA_VERBOSE_CMAKE)
9
10 # Load the compiler settings used for @LIBRARY_NAME@.
11 IF(@LIBRARY_NAME@_BUILD_SETTINGS_FILE)
12   INCLUDE(CMakeImportBuildSettings)
13   CMAKE_IMPORT_BUILD_SETTINGS(${@LIBRARY_NAME@_BUILD_SETTINGS_FILE})
14 ENDIF(@LIBRARY_NAME@_BUILD_SETTINGS_FILE)
15
16 # Add compiler flags needed to use @LIBRARY_NAME@.
17 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${@LIBRARY_NAME@_REQUIRED_C_FLAGS}")
18 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${@LIBRARY_NAME@_REQUIRED_CXX_FLAGS}")
19 SET(CMAKE_LINK_FLAGS "${CMAKE_LINK_FLAGS} ${@LIBRARY_NAME@_REQUIRED_LINK_FLAGS}")
20
21 # Add include directories needed to use @LIBRARY_NAME@.
22 INCLUDE_DIRECTORIES(${@LIBRARY_NAME@_INCLUDE_DIRS})
23
24 # Add link directories needed to use @LIBRARY_NAME@.
25 LINK_DIRECTORIES(${@LIBRARY_NAME@_LIBRARY_DIRS})
26
27 # Set the version 
28 # Already done in bbtkConfigure.h
29 #ADD_DEFINITIONS( -D@LIBRARY_NAME@_VERSION="\"${@LIBRARY_NAME@_VERSION}\"" )
30
31 # Additional use file 
32 IF (@LIBRARY_NAME@_HAS_ADDITIONAL_CONFIG_FILE)
33   # Include it
34   INCLUDE(${@LIBRARY_NAME@_DIR}/AdditionalUse@LIBRARY_NAME@.cmake)
35 ENDIF (@LIBRARY_NAME@_HAS_ADDITIONAL_CONFIG_FILE)