mirror of
https://github.com/SFML/SFML.git
synced 2025-02-23 14:56:02 +08:00
Consolidate target_include_directories
calls
This commit is contained in:
parent
80d277cca3
commit
1a06f6c395
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user