mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Several corrections to the CMake project files (thanks, Ozkan!).
Fixes Bugzilla #2732.
This commit is contained in:
parent
34415c4557
commit
3c76d2ff19
@ -596,7 +596,7 @@ if(LIBC)
|
|||||||
set(CMAKE_REQUIRED_LIBRARIES m)
|
set(CMAKE_REQUIRED_LIBRARIES m)
|
||||||
foreach(_FN
|
foreach(_FN
|
||||||
atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin
|
atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin
|
||||||
sinf sqrt sqrtf tan tanf)
|
sinf sqrt sqrtf tan tanf acos asin)
|
||||||
string(TOUPPER ${_FN} _UPPER)
|
string(TOUPPER ${_FN} _UPPER)
|
||||||
set(_HAVEVAR "HAVE_${_UPPER}")
|
set(_HAVEVAR "HAVE_${_UPPER}")
|
||||||
check_function_exists("${_FN}" ${_HAVEVAR})
|
check_function_exists("${_FN}" ${_HAVEVAR})
|
||||||
@ -608,6 +608,15 @@ if(LIBC)
|
|||||||
check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
|
check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
|
||||||
if(HAVE_LIBICONV)
|
if(HAVE_LIBICONV)
|
||||||
list(APPEND EXTRA_LIBS iconv)
|
list(APPEND EXTRA_LIBS iconv)
|
||||||
|
set(HAVE_ICONV 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT APPLE)
|
||||||
|
check_include_file(alloca.h HAVE_ALLOCA_H)
|
||||||
|
check_function_exists(alloca HAVE_ALLOCA)
|
||||||
|
else()
|
||||||
|
set(HAVE_ALLOCA_H 1)
|
||||||
|
set(HAVE_ALLOCA 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_struct_has_member("struct sigaction" "sa_sigaction" "signal.h" HAVE_SA_SIGACTION)
|
check_struct_has_member("struct sigaction" "sa_sigaction" "signal.h" HAVE_SA_SIGACTION)
|
||||||
|
@ -725,7 +725,7 @@ macro(CheckOpenGLESX11)
|
|||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# Rquires:
|
# Requires:
|
||||||
# - nada
|
# - nada
|
||||||
# Optional:
|
# Optional:
|
||||||
# - THREADS opt
|
# - THREADS opt
|
||||||
@ -776,6 +776,9 @@ macro(CheckPTHREAD)
|
|||||||
|
|
||||||
# Run some tests
|
# Run some tests
|
||||||
set(CMAKE_REQUIRED_FLAGS "${PTHREAD_CFLAGS} ${PTHREAD_LDFLAGS}")
|
set(CMAKE_REQUIRED_FLAGS "${PTHREAD_CFLAGS} ${PTHREAD_LDFLAGS}")
|
||||||
|
if(CMAKE_CROSSCOMPILING)
|
||||||
|
set(HAVE_PTHREADS 1)
|
||||||
|
else()
|
||||||
check_c_source_runs("
|
check_c_source_runs("
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
@ -783,6 +786,7 @@ macro(CheckPTHREAD)
|
|||||||
pthread_attr_init(&type);
|
pthread_attr_init(&type);
|
||||||
return 0;
|
return 0;
|
||||||
}" HAVE_PTHREADS)
|
}" HAVE_PTHREADS)
|
||||||
|
endif()
|
||||||
if(HAVE_PTHREADS)
|
if(HAVE_PTHREADS)
|
||||||
set(SDL_THREAD_PTHREAD 1)
|
set(SDL_THREAD_PTHREAD 1)
|
||||||
list(APPEND EXTRA_CFLAGS ${PTHREAD_CFLAGS})
|
list(APPEND EXTRA_CFLAGS ${PTHREAD_CFLAGS})
|
||||||
@ -831,9 +835,8 @@ macro(CheckPTHREAD)
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <pthread_np.h>
|
#include <pthread_np.h>
|
||||||
int main(int argc, char** argv) { return 0; }" HAVE_PTHREAD_NP_H)
|
int main(int argc, char** argv) { return 0; }" HAVE_PTHREAD_NP_H)
|
||||||
check_function_exists(pthread_setname_np HAVE_PTHREAD_setNAME_NP)
|
check_function_exists(pthread_setname_np HAVE_PTHREAD_SETNAME_NP)
|
||||||
check_function_exists(pthread_set_name_np HAVE_PTHREAD_set_NAME_NP)
|
check_function_exists(pthread_set_name_np HAVE_PTHREAD_SET_NAME_NP) set(CMAKE_REQUIRED_FLAGS)
|
||||||
set(CMAKE_REQUIRED_FLAGS)
|
|
||||||
|
|
||||||
set(SOURCE_FILES ${SOURCE_FILES}
|
set(SOURCE_FILES ${SOURCE_FILES}
|
||||||
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
|
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
|
||||||
|
Loading…
Reference in New Issue
Block a user