-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
54 lines (46 loc) · 1.49 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
# CMake entry point
cmake_minimum_required (VERSION 3.11)
project (basic_texture_atlas)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include_directories(
${PROJECT_SOURCE_DIR}/include/
${PROJECT_SOURCE_DIR}/lodepng/
)
add_library(
basic_texture_atlas_lib
${PROJECT_SOURCE_DIR}/lodepng/lodepng.cpp
${PROJECT_SOURCE_DIR}/src/ImageDecoder.cpp
${PROJECT_SOURCE_DIR}/src/ImageEncoder.cpp
${PROJECT_SOURCE_DIR}/src/ImageReel.cpp
${PROJECT_SOURCE_DIR}/src/ImageSrcDir.cpp
${PROJECT_SOURCE_DIR}/src/AtlasMetaDataWriter.cpp
${PROJECT_SOURCE_DIR}/src/RgbaImage.cpp
)
target_link_libraries(
basic_texture_atlas_lib
)
add_executable(
basic_texture_atlas_host
${PROJECT_SOURCE_DIR}/src/main.cpp
)
target_link_libraries(
basic_texture_atlas_host
basic_texture_atlas_lib
)
if(WIN32)
add_custom_command(TARGET basic_texture_atlas_host POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/test_images
${CMAKE_CURRENT_BINARY_DIR}/Debug/test_images)
add_custom_command(TARGET basic_texture_atlas_host POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/test_images
${CMAKE_CURRENT_BINARY_DIR}/Release/test_images)
else()
add_custom_command(TARGET basic_texture_atlas_host POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/test_images
${CMAKE_CURRENT_BINARY_DIR}/test_images)
endif()