2 # User Bastien Bouclet <bastien.bouclet@gmail.com>
3 # Date 1523420183 -7200
4 # Wed Apr 11 06:16:23 2018 +0200
5 # Branch cmake-include-path
6 # Node ID 52f0351c30b25ec2bb5b0bced247ba858991bec2
7 # Parent fbfacc66c65c3b38ca065ecee1f69fcbc643c14a
8 Fix the include path in the installed CMake target import file
10 Previously the include path was {INSTALL_PREFIX}/include,
11 it is now {INSTALL_PREFIX}/include/SDL2 to be consistent with
12 the other build and package configuration systems.
16 diff -r fbfacc66c65c -r 52f0351c30b2 CMakeLists.txt
17 --- a/CMakeLists.txt Mon Mar 26 12:38:29 2018 -0700
18 +++ b/CMakeLists.txt Wed Apr 11 06:16:23 2018 +0200
21 # Always build SDLmain
22 add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
23 -target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>)
24 +target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include/SDL2>)
25 set(_INSTALL_LIBS "SDL2main")
27 set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
30 set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
31 target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
32 - target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include>)
33 + target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include/SDL2>)
35 set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
38 # libraries - do we need to consider this?
39 set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
40 target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
41 - target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include>)
42 + target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include/SDL2>)
44 set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})