forked from digital-sound-antiques/kss2vgm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (31 loc) · 906 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 2.8)
if(MSVC)
set(CMAKE_C_FLAGS "/Ox /W3 /wd4996")
set(configurations
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
)
foreach(flag_var ${configurations})
if(${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif(${flag_var} MATCHES "/MD")
endforeach()
else()
set(CMAKE_C_FLAGS "-O3 -Wall")
endif(MSVC)
add_subdirectory(modules/libkss)
file(GLOB SOURCES src/*.c src/**/*.c)
include_directories(modules/libkss/src)
include_directories(modules/libkss/modules)
add_executable(kss2vgm src/kss2vgm.c)
if(NOT CMAKE_COMPILER_IS_GNUCC)
target_link_libraries(kss2vgm kss)
else()
target_link_libraries(kss2vgm kss m)
endif()