1. Clean up CMake files for finding and linking boost and CMake files
[dyninst.git] / cmake / DyninstConfig.cmake.in
1 # - Config file for Dyninst and its component libraries
2 # It defines the following variables:
3 #
4 # DYNINST_INCLUDE_DIRS
5 # DYNINST_LIBRARIES
6 # DYNINST_INTERNAL_DEFINES - used by the test suite
7
8 # compute paths
9
10 get_filename_component(DYNINST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
11 set (DYNINST_INCLUDE_DIR @CONF_INCLUDE_DIRS@)
12
13 # Library dependencies
14 #include ("${DYNINST_CMAKE_DIR}/DyninstTargets.cmake")
15 foreach(TARG @ALL_DYNINST_TARGETS@)
16   include ("${DYNINST_CMAKE_DIR}/${TARG}Targets.cmake" OPTIONAL)
17 endforeach()
18
19 set (DYNINST_LIBRARIES "dyninstAPI")
20
21 # Other variables Dyninst mutators may depend on
22 set (DYNINST_PLATFORM "@PLATFORM@")
23 set (DYNINST_INTERNAL_DEFINES @UNIFIED_DEFINES@)
24 set (USE_CXX11_ABI "@USE_CXX11_ABI@")
25
26 if(DYNINST_FIND_COMPONENTS)
27   foreach(COMP DYNINST_FIND_COMPONENTS)
28     if(NOT TARGET ${COMP})
29       set(DYNINST_${COMP}_FOUND 0)
30       if(DYNINST_FIND_REQUIRED_${COMP})
31         MESSAGE(ERROR "${COMP} was not part of the Dyninst build")
32       endif()
33     else()
34       set(DYNINST_${COMP}_FOUND 1)
35       MESSAGE(STATUS "Found ${COMP}")
36     endif()
37   endforeach()
38 endif()
39
40 if(TARGET dyninstAPI)
41   set(Dyninst_FOUND 1)
42 else()
43   set(Dyninst_FOUND 0)
44 endif()
45