2019-09-24 21:43:44 +00:00
|
|
|
cmake_minimum_required( VERSION 2.8.7 )
|
|
|
|
|
|
|
|
make_release_only()
|
|
|
|
|
|
|
|
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()
|
|
|
|
|
|
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ZD_FASTMATH_FLAG}")
|
|
|
|
|
2019-09-25 08:40:20 +00:00
|
|
|
include( CheckFunctionExists )
|
|
|
|
|
|
|
|
CHECK_FUNCTION_EXISTS( stricmp STRICMP_EXISTS )
|
|
|
|
if( NOT STRICMP_EXISTS )
|
|
|
|
add_definitions( -Dstricmp=strcasecmp )
|
|
|
|
endif()
|
|
|
|
|
2019-09-24 21:43:44 +00:00
|
|
|
include_directories( timidity )
|
|
|
|
|
|
|
|
file( GLOB HEADER_FILES
|
|
|
|
timidity/*.h
|
|
|
|
)
|
|
|
|
add_library( timidity STATIC
|
|
|
|
common.cpp
|
|
|
|
instrum.cpp
|
|
|
|
instrum_dls.cpp
|
|
|
|
instrum_font.cpp
|
|
|
|
instrum_sf2.cpp
|
|
|
|
mix.cpp
|
|
|
|
playmidi.cpp
|
|
|
|
resample.cpp
|
|
|
|
timidity.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries( timidity )
|