mirror of https://github.com/libsdl-org/SDL
cmake: use option to pass extra check options instead of hardcoding them
This commit is contained in:
parent
b4fc66525c
commit
c9b8559af5
|
@ -44,5 +44,7 @@ jobs:
|
||||||
libudev-devd
|
libudev-devd
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -GNinja
|
cmake -S . -B build -GNinja \
|
||||||
|
-DSDL_EXTRA_CHECK_INCLUDES="/usr/local/include" \
|
||||||
|
-DSDL_EXTRA_CHECK_LINK_OPTIONS="-L/usr/local/lib"
|
||||||
cmake --build build --verbose -- -j`sysctl -n hw.ncpu`
|
cmake --build build --verbose -- -j`sysctl -n hw.ncpu`
|
||||||
|
|
|
@ -203,10 +203,12 @@ elseif(NINTENDO_3DS)
|
||||||
set(N3DS TRUE)
|
set(N3DS TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
|
set(SDL_EXTRA_CHECK_INCLUDES "" CACHE STRING "Extra includes (for CMAKE_REQUIRED_INCLUDES)")
|
||||||
list(APPEND CMAKE_REQUIRED_INCLUDES /usr/local/include)
|
set(SDL_EXTRA_CHECK_LINK_OPTIONS "" CACHE STRING "Extra link options (for CMAKE_REQUIRED_LINK_OPTIONS)")
|
||||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-L/usr/local/lib")
|
mark_as_advanced(SDL_EXTRA_CHECK_INCLUDES SDL_EXTRA_CHECK_LINK_OPTIONS)
|
||||||
endif()
|
|
||||||
|
list(APPEND CMAKE_REQUIRED_INCLUDES ${SDL_CHECK_REQUIRED_INCLUDES})
|
||||||
|
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${SDL_CHECK_REQUIRED_LINK_OPTIONS})
|
||||||
|
|
||||||
# Don't mistake osx for unix
|
# Don't mistake osx for unix
|
||||||
if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT RISCOS)
|
if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT RISCOS)
|
||||||
|
|
Loading…
Reference in New Issue