forked from Deefunct/ssbp-Viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (45 loc) · 1.25 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.0.0)
set(PROJECT ssbpPlayer)
project(${PROJECT})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(OpenGL REQUIRED)
find_package(glfw3 REQUIRED)
find_package(glm REQUIRED)
find_package(ImageMagick COMPONENTS Magick++ MagickCore MagickWand REQUIRED)
string(REPLACE "_RL_" "_DB_" ImageMagick_LIBRARIES_DEBUG "${ImageMagick_LIBRARIES}")
add_compile_options(
-wd4251 # needs to have dll-interface
-wd4275 # non dll-interface class used as base for dll-interface class
)
set(SOURCES
src/glad.c
src/Screenshot.cpp
src/SsbpResource.cpp
src/SsbpReader.cpp
src/SsbpPlayer.cpp
src/SsbpViewer.cpp
)
add_executable(${PROJECT}
${SOURCES}
src/main.cpp
)
target_include_directories(${PROJECT} PRIVATE
${PROJECT_SOURCE_DIR}
include
${ImageMagick_INCLUDE_DIRS}
)
target_link_libraries(${PROJECT}
opengl32
glfw
glm::glm
debug
"${ImageMagick_LIBRARIES_DEBUG}"
optimized
"${ImageMagick_LIBRARIES}"
)
add_custom_command(
TARGET ${PROJECT} POST_BUILD
#COMMAND $<IF:$<PLATFORM_ID:Windows>,dir,ls> "${ImageMagick_INCLUDE_DIRS}/.."
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${PROJECT}>" "${PROJECT_SOURCE_DIR}/bin"
)