Ver código fonte

Made CMakeLists.txt installation relocatable.

The installation interface should really be a relative path.
John Butterfield 7 anos atrás
pai
commit
b54cf3cb45
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      CMakeLists.txt

+ 2 - 2
CMakeLists.txt

@@ -60,7 +60,7 @@ set_target_properties(tinyxml2 PROPERTIES
 if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
     target_include_directories(tinyxml2 PUBLIC 
                           $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
-                          $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>)
+                          $<INSTALL_INTERFACE:include>)
 
     if(MSVC)
       target_compile_definitions(tinyxml2 PUBLIC -D_CRT_SECURE_NO_WARNINGS)
@@ -97,7 +97,7 @@ target_compile_definitions(tinyxml2_static PUBLIC -D_CRT_SECURE_NO_WARNINGS)
 if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
     target_include_directories(tinyxml2_static PUBLIC 
                           $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
-                          $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>)
+                          $<INSTALL_INTERFACE:include>)
 
     if(MSVC)
       target_compile_definitions(tinyxml2_static PUBLIC -D_CRT_SECURE_NO_WARNINGS)