-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
40 lines (33 loc) · 974 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
37
38
39
40
cmake_policy(SET CMP0091 NEW)
cmake_minimum_required(VERSION 3.15)
project(FreeSyobonAction)
if (CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "Debug")
endif ()
# use DXLIB_PATH to specify the path of the DxLib which you want to link
include(3rdparty/dxlib.cmake)
set(SOURCE_FILES
src/main.cpp
src/main.h
src/loadg.cpp
src/resource.rc
src/icon.ico
)
add_executable(syobon_action WIN32 ${SOURCE_FILES})
# VC6 workaround
if (MSVC_VERSION EQUAL 1200)
target_compile_options(syobon_action
PRIVATE $<IF:$<CONFIG:Debug>,/MLd,/ML>
)
endif ()
target_link_libraries(syobon_action dxlib)
foreach (dir BGM res SE)
file(GLOB ${dir}_FILES "${dir}/*")
add_custom_command(
TARGET syobon_action
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${dir}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${${dir}_FILES} ${dir}
COMMENT "Copying resources to \"${dir}\"..."
)
endforeach ()