mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 10:53:27 +08:00
cmake: only install SDL_test*.h headers when building SDL_test library
This commit is contained in:
parent
d53cd7161a
commit
fe8291e09a
@ -2864,8 +2864,9 @@ listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS)
|
||||
set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
|
||||
|
||||
file(GLOB SDL3_INCLUDE_FILES ${SDL3_SOURCE_DIR}/include/SDL3/*.h)
|
||||
file(GLOB SDL3_TEST_INCLUDE_FILES ${SDL3_SOURCE_DIR}/include/SDL3/SDL_test*.h)
|
||||
foreach(_hdr IN LISTS SDL3_INCLUDE_FILES)
|
||||
if(_hdr MATCHES ".*SDL_revision.h")
|
||||
if(_hdr MATCHES ".*SDL_revision\\.h" OR _hdr MATCHES ".*SDL_test.*\\.h")
|
||||
list(REMOVE_ITEM SDL3_INCLUDE_FILES "${_hdr}")
|
||||
endif()
|
||||
endforeach()
|
||||
@ -3337,7 +3338,14 @@ if(NOT SDL3_DISABLE_INSTALL)
|
||||
FILES
|
||||
${SDL3_INCLUDE_FILES}
|
||||
"${SDL3_BINARY_DIR}/include/SDL3/SDL_revision.h"
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SDL3)
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SDL3
|
||||
)
|
||||
if(SDL_TEST)
|
||||
install(
|
||||
FILES ${SDL3_TEST_INCLUDE_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SDL3
|
||||
)
|
||||
endif()
|
||||
|
||||
install(FILES "LICENSE.txt" DESTINATION "${LICENSES_PREFIX}")
|
||||
if(FREEBSD)
|
||||
|
Loading…
Reference in New Issue
Block a user