chiark / gitweb /
Add install include directories to target properties
authorMarkus Rickert <rickert@fortiss.org>
Sun, 10 Sep 2017 17:07:18 +0000 (19:07 +0200)
committerMarkus Rickert <rickert@fortiss.org>
Sun, 10 Sep 2017 17:07:18 +0000 (19:07 +0200)
CMakeLists.txt

index 99aa28f0f18592a036f634bd7b2f2f6add12bca4..48644780edc2ab27db9f0b4c1ceece11054442bf 100644 (file)
@@ -236,7 +236,7 @@ target_include_directories (${nlopt_lib} PRIVATE
   api)\r
 \r
 get_target_property (NLOPT_PRIVATE_INCLUDE_DIRS ${nlopt_lib} INCLUDE_DIRECTORIES)\r
-target_include_directories (${nlopt_lib} INTERFACE "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/api>")\r
+target_include_directories (${nlopt_lib} INTERFACE "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/api>" "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")\r
 \r
 if (BUILD_SHARED_LIBS)\r
   target_compile_definitions (${nlopt_lib} PUBLIC -DNLOPT_DLL)\r