mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
6fafa297bf
This makes sure the internal versions of these libraries bundled with the GZDoom source code is used. This prevents the system from building GZDoom for dynamic linking with incompatible external libraries (see <https://forum.zdoom.org/viewtopic.php?f=2&t=64633>).
45 lines
1.2 KiB
CMake
45 lines
1.2 KiB
CMake
cmake_minimum_required( VERSION 2.8.7 )
|
|
|
|
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
|
|
|
# Disable warnings for << operator precedence (4554) and
|
|
# unreferenced labels (4102) from VC
|
|
if( MSVC )
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4554 /wd4102" )
|
|
endif()
|
|
|
|
if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra" )
|
|
endif()
|
|
|
|
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
|
|
add_definitions( -DINFNAN_CHECK -DMULTIPLE_THREADS )
|
|
|
|
if( NOT MSVC AND NOT APPLE )
|
|
if( NOT CMAKE_CROSSCOMPILING )
|
|
add_executable( arithchk arithchk.c )
|
|
endif()
|
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h
|
|
COMMAND arithchk >${CMAKE_CURRENT_BINARY_DIR}/arith.h
|
|
DEPENDS arithchk )
|
|
|
|
if( NOT CMAKE_CROSSCOMPILING )
|
|
add_executable( qnan qnan.c arith.h )
|
|
set( CROSS_EXPORTS ${CROSS_EXPORTS} arithchk qnan PARENT_SCOPE )
|
|
endif()
|
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h
|
|
COMMAND qnan >${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h
|
|
DEPENDS qnan )
|
|
|
|
set( GEN_FP_FILES arith.h gd_qnan.h )
|
|
set( GEN_FP_DEPS ${CMAKE_CURRENT_BINARY_DIR}/arith.h ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h )
|
|
endif()
|
|
|
|
add_library( gdtoa STATIC
|
|
${GEN_FP_FILES}
|
|
dmisc.c
|
|
dtoa.c
|
|
misc.c
|
|
)
|
|
target_link_libraries( gdtoa )
|
|
|