CMake: Populate the INCLUDE_DIRECTORIES property of installed targets (#323)

Populate the INCLUDE_DIRECTORIES property of installed targets

Fix By: Dmitry Igrishin (@dmitigr)
pull/325/head
Dmitry Igrishin 5 years ago committed by GitHub
parent ca90563868
commit dbdde3a424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CMakeLists.txt

@ -616,6 +616,7 @@ IF (CARES_SHARED)
TARGET_INCLUDE_DIRECTORIES (${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>")
TARGET_INCLUDE_DIRECTORIES (${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>")
TARGET_INCLUDE_DIRECTORIES (${PROJECT_NAME} PUBLIC "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
TARGET_COMPILE_DEFINITIONS (${PROJECT_NAME} PRIVATE HAVE_CONFIG_H=1 CARES_BUILDING_LIBRARY)
@ -659,6 +660,7 @@ IF (CARES_STATIC)
TARGET_INCLUDE_DIRECTORIES (${LIBNAME} PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>")
TARGET_INCLUDE_DIRECTORIES (${LIBNAME} PUBLIC "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>")
TARGET_INCLUDE_DIRECTORIES (${LIBNAME} PUBLIC "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
TARGET_COMPILE_DEFINITIONS (${LIBNAME}
PUBLIC CARES_STATICLIB

Loading…
Cancel
Save