mirror of https://github.com/AxioDL/tinyxml2.git
Merge pull request #445 from kurylo/master
Add INCLUDE_DIRECTORIES on the targets for supported cmake versions.
This commit is contained in:
commit
d7e5f47524
|
@ -22,7 +22,7 @@ set(GENERIC_LIB_SOVERSION "3")
|
|||
|
||||
|
||||
################################
|
||||
# Add common source
|
||||
# Add common source
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/.")
|
||||
|
||||
|
@ -72,6 +72,10 @@ set_target_properties(tinyxml2 PROPERTIES
|
|||
VERSION "${GENERIC_LIB_VERSION}"
|
||||
SOVERSION "${GENERIC_LIB_SOVERSION}")
|
||||
|
||||
if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
|
||||
target_include_directories(tinyxml2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/.")
|
||||
endif()
|
||||
|
||||
install(TARGETS tinyxml2
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
@ -86,6 +90,10 @@ set_target_properties(tinyxml2_static PROPERTIES
|
|||
SOVERSION "${GENERIC_LIB_SOVERSION}")
|
||||
set_target_properties( tinyxml2_static PROPERTIES OUTPUT_NAME tinyxml2 )
|
||||
|
||||
if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
|
||||
target_include_directories(tinyxml2_static INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/.")
|
||||
endif()
|
||||
|
||||
install(TARGETS tinyxml2_static
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
|
Loading…
Reference in New Issue