Consolidate target_include_directories calls

This commit is contained in:
Chris Thrasher 2023-10-26 15:33:00 -06:00
parent 80d277cca3
commit 1a06f6c395
No known key found for this signature in database
GPG Key ID: 56FB686C9DFC8E2C
2 changed files with 10 additions and 10 deletions

View File

@ -92,11 +92,11 @@ sfml_add_library(Graphics
# setup dependencies # setup dependencies
target_link_libraries(sfml-graphics PUBLIC SFML::Window) target_link_libraries(sfml-graphics PUBLIC SFML::Window)
# stb_image sources # 3rd party sources
target_include_directories(sfml-graphics SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/stb_image") target_include_directories(sfml-graphics SYSTEM PRIVATE
${PROJECT_SOURCE_DIR}/extlibs/headers/stb_image
# glad sources ${PROJECT_SOURCE_DIR}/extlibs/headers/glad/include
target_include_directories(sfml-graphics SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/glad/include") )
# find external libraries # find external libraries
if(SFML_OS_ANDROID) if(SFML_OS_ANDROID)

View File

@ -282,8 +282,11 @@ if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
endif() endif()
target_link_libraries(sfml-window PUBLIC SFML::System) target_link_libraries(sfml-window PUBLIC SFML::System)
# glad sources # 3rd party sources
target_include_directories(sfml-window SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/glad/include") target_include_directories(sfml-window SYSTEM PRIVATE
${PROJECT_SOURCE_DIR}/extlibs/headers/glad/include
${PROJECT_SOURCE_DIR}/extlibs/headers/vulkan
)
# When static linking on macOS, we need to add this flag for objective C to work # When static linking on macOS, we need to add this flag for objective C to work
# https://developer.apple.com/library/archive/qa/qa1490/_index.html # https://developer.apple.com/library/archive/qa/qa1490/_index.html
@ -291,9 +294,6 @@ if((NOT BUILD_SHARED_LIBS) AND SFML_OS_MACOS)
target_link_libraries(sfml-window PRIVATE -ObjC) target_link_libraries(sfml-window PRIVATE -ObjC)
endif() endif()
# Vulkan headers
target_include_directories(sfml-window SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/vulkan")
# CMake 3.11 and later prefer to choose GLVND, but we choose legacy OpenGL for backward compatibility # CMake 3.11 and later prefer to choose GLVND, but we choose legacy OpenGL for backward compatibility
# (unless the OpenGL_GL_PREFERENCE was explicitly set) # (unless the OpenGL_GL_PREFERENCE was explicitly set)
# See CMP0072 for more details (cmake --help-policy CMP0072) # See CMP0072 for more details (cmake --help-policy CMP0072)