mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-15 09:18:27 +00:00
Allow in-tree build
This commit is contained in:
parent
6647345be0
commit
f543faf837
3 changed files with 24 additions and 16 deletions
|
@ -299,8 +299,8 @@ function(check_linker_supports_version_file VAR)
|
|||
set(LINKER_SUPPORTS_VERSION_SCRIPT FALSE)
|
||||
else()
|
||||
cmake_push_check_state(RESET)
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n")
|
||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/dummy.sym")
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n")
|
||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/dummy.sym")
|
||||
check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" LINKER_SUPPORTS_VERSION_SCRIPT FAIL_REGEX "(unsupported|syntax error|unrecognized option)")
|
||||
cmake_pop_check_state()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue