mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 06:42:08 +00:00
- implemented str(n)icmp function definitions via CMake macro
This commit is contained in:
parent
c09f196141
commit
46270326be
6 changed files with 25 additions and 50 deletions
|
@ -156,6 +156,22 @@ macro( use_fast_math )
|
|||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ZD_FASTMATH_FLAG}" )
|
||||
endmacro()
|
||||
|
||||
include( CheckFunctionExists )
|
||||
|
||||
macro( require_stricmp )
|
||||
CHECK_FUNCTION_EXISTS( stricmp STRICMP_EXISTS )
|
||||
if( NOT STRICMP_EXISTS )
|
||||
add_definitions( -Dstricmp=strcasecmp )
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro( require_strnicmp )
|
||||
CHECK_FUNCTION_EXISTS( strnicmp STRNICMP_EXISTS )
|
||||
if( NOT STRNICMP_EXISTS )
|
||||
add_definitions( -Dstrnicmp=strncasecmp )
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
option( NO_OPENAL "Disable OpenAL sound support" OFF )
|
||||
|
||||
find_package( BZip2 )
|
||||
|
|
|
@ -1,24 +1,14 @@
|
|||
cmake_minimum_required( VERSION 2.8.7 )
|
||||
|
||||
use_fast_math()
|
||||
require_stricmp()
|
||||
require_strnicmp()
|
||||
|
||||
if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -fomit-frame-pointer" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
|
||||
endif()
|
||||
|
||||
include( CheckFunctionExists )
|
||||
|
||||
CHECK_FUNCTION_EXISTS( stricmp STRICMP_EXISTS )
|
||||
if( NOT STRICMP_EXISTS )
|
||||
add_definitions( -Dstricmp=strcasecmp )
|
||||
endif()
|
||||
|
||||
CHECK_FUNCTION_EXISTS( strnicmp STRNICMP_EXISTS )
|
||||
if( NOT STRNICMP_EXISTS )
|
||||
add_definitions( -Dstrnicmp=strncasecmp )
|
||||
endif()
|
||||
|
||||
include_directories( oplsynth )
|
||||
|
||||
file( GLOB HEADER_FILES
|
||||
|
|
|
@ -1,19 +1,13 @@
|
|||
cmake_minimum_required( VERSION 2.8.7 )
|
||||
|
||||
use_fast_math()
|
||||
require_stricmp()
|
||||
|
||||
if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -fomit-frame-pointer" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
|
||||
endif()
|
||||
|
||||
include( CheckFunctionExists )
|
||||
|
||||
CHECK_FUNCTION_EXISTS( stricmp STRICMP_EXISTS )
|
||||
if( NOT STRICMP_EXISTS )
|
||||
add_definitions( -Dstricmp=strcasecmp )
|
||||
endif()
|
||||
|
||||
include_directories( timidity )
|
||||
|
||||
file( GLOB HEADER_FILES
|
||||
|
|
|
@ -1,24 +1,14 @@
|
|||
cmake_minimum_required( VERSION 2.8.7 )
|
||||
|
||||
use_fast_math()
|
||||
require_stricmp()
|
||||
require_strnicmp()
|
||||
|
||||
if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -fomit-frame-pointer" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
|
||||
endif()
|
||||
|
||||
include( CheckFunctionExists )
|
||||
|
||||
CHECK_FUNCTION_EXISTS( stricmp STRICMP_EXISTS )
|
||||
if( NOT STRICMP_EXISTS )
|
||||
add_definitions( -Dstricmp=strcasecmp )
|
||||
endif()
|
||||
|
||||
CHECK_FUNCTION_EXISTS( strnicmp STRNICMP_EXISTS )
|
||||
if( NOT STRNICMP_EXISTS )
|
||||
add_definitions( -Dstrnicmp=strncasecmp )
|
||||
endif()
|
||||
|
||||
include_directories( wildmidi )
|
||||
|
||||
file( GLOB HEADER_FILES
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
cmake_minimum_required( VERSION 2.8.7 )
|
||||
|
||||
use_fast_math()
|
||||
require_stricmp()
|
||||
require_strnicmp()
|
||||
|
||||
if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -fomit-frame-pointer" )
|
||||
|
@ -9,16 +11,6 @@ endif()
|
|||
|
||||
include( CheckFunctionExists )
|
||||
|
||||
CHECK_FUNCTION_EXISTS( stricmp STRICMP_EXISTS )
|
||||
if( NOT STRICMP_EXISTS )
|
||||
add_definitions( -Dstricmp=strcasecmp )
|
||||
endif()
|
||||
|
||||
CHECK_FUNCTION_EXISTS( strnicmp STRNICMP_EXISTS )
|
||||
if( NOT STRNICMP_EXISTS )
|
||||
add_definitions( -Dstrnicmp=strncasecmp )
|
||||
endif()
|
||||
|
||||
if( DYN_SNDFILE)
|
||||
add_definitions( -DHAVE_SNDFILE -DDYN_SNDFILE )
|
||||
else()
|
||||
|
|
|
@ -401,15 +401,8 @@ if( NOT STRUPR_EXISTS )
|
|||
add_definitions( -DNEED_STRUPR=1 )
|
||||
endif()
|
||||
|
||||
CHECK_FUNCTION_EXISTS( stricmp STRICMP_EXISTS )
|
||||
if( NOT STRICMP_EXISTS )
|
||||
add_definitions( -Dstricmp=strcasecmp )
|
||||
endif()
|
||||
|
||||
CHECK_FUNCTION_EXISTS( strnicmp STRNICMP_EXISTS )
|
||||
if( NOT STRNICMP_EXISTS )
|
||||
add_definitions( -Dstrnicmp=strncasecmp )
|
||||
endif()
|
||||
require_stricmp()
|
||||
require_strnicmp()
|
||||
|
||||
if( NOT MSVC )
|
||||
add_definitions( -D__forceinline=inline )
|
||||
|
|
Loading…
Reference in a new issue