Merge pull request #94 from Gachapen/cmake_target_include

CMake: Add include directory to jsoncpp_lib target

Well-researched. Passes Travis CI.
This commit is contained in:
Christopher Dunn 2014-12-24 01:30:13 -06:00
commit 8dd32e1e2e

View File

@ -43,6 +43,12 @@ ADD_LIBRARY( jsoncpp_lib ${JSONCPP_LIB_TYPE}
SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp )
SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_VERSION_MAJOR} )
IF(CMAKE_VERSION VERSION_EQUAL 2.8.11 OR CMAKE_VERSION VERSION_GREATER 2.8.11)
TARGET_INCLUDE_DIRECTORIES( jsoncpp_lib
PUBLIC ${JSONCPP_INCLUDE_DIR}
)
ENDIF(CMAKE_VERSION VERSION_EQUAL 2.8.11 OR CMAKE_VERSION VERSION_GREATER 2.8.11)
# Install instructions for this target
IF(JSONCPP_WITH_CMAKE_PACKAGE)
TARGET_INCLUDE_DIRECTORIES( jsoncpp_lib