Fix include dirs in build dir openobex-config.cmake
[openobex:mainline.git] / openobex-config.cmake.in
1 # - Config file for the OpenObex package
2 # It defines the following variables
3 #  OpenObex_INCLUDE_DIRS - include directories for FooBar
4 #  OpenObex_LIBRARIES    - libraries to link against
5
6 get_filename_component(OpenObex_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
7 if (EXISTS "${OpenObex_CMAKE_DIR}/lib/openobex-build.cmake")
8   #in build tree
9   include(${OpenObex_CMAKE_DIR}/lib/openobex-build.cmake)
10   include(${OpenObex_CMAKE_DIR}/lib/openobex-build-settings.cmake)
11
12   set(OpenObex_INCLUDE_DIRS
13     ${OpenObex_CMAKE_DIR}/include
14     ${OpenObex_SOURCE_DIR}/include
15   )
16
17 else ()
18   #in installed tree
19   include(${OpenObex_CMAKE_DIR}/openobex-target.cmake)
20
21   set(OpenObex_CMAKE_REL_INCLUDE_DIR "@CMAKE_INSTALL_REL_INCLUDEDIR@")
22   get_filename_component(OpenObex_ABS_INCLUDE_DIR
23     "${OpenObex_CMAKE_DIR}/${OpenObex_CMAKE_REL_INCLUDE_DIR}" ABSOLUTE)
24
25   set(OpenObex_INCLUDE_DIRS "${OpenObex_ABS_INCLUDE_DIR}")
26 endif()
27
28 set(OpenObex_LIBRARIES openobex)