-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
52 lines (43 loc) · 1.48 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
cmake_minimum_required (VERSION 3.4)
project (VQUtils)
add_compile_options(/MP)
add_compile_options(/std:c++17)
set (Lib_headers
"Libs/stb/stb_image.h"
"Libs/stb/stb_image_resize.h"
"Libs/stb/stb_image_write.h"
"Libs/tinyxml2/tinyxml2.h"
"Libs/tinyexr/tinyexr.h"
"Libs/miniz/miniz.h"
)
set (Headers
"Source/Log.h"
"Source/utils.h"
"Source/Multithreading.h"
"Source/SystemInfo.h"
"Source/Image.h"
"Source/Timer.h"
)
set (Source
"Source/Log.cpp"
"Source/utils.cpp"
"Source/Multithreading.cpp"
"Source/SystemInfo.cpp"
"Source/Image.cpp"
"Source/Timer.cpp"
"Libs/tinyxml2/tinyxml2.cpp"
"Libs/miniz/miniz.c"
)
source_group("Libs" FILES ${Lib_headers})
set_source_files_properties(${Lib_headers} PROPERTIES VS_TOOL_OVERRIDE "Text")
add_definitions(-DNOMINMAX)
# set ouput directory
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/Bin)
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_CURRENT_SOURCE_DIR}/Bin/${OUTPUTCONFIG} )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_CURRENT_SOURCE_DIR}/Bin/${OUTPUTCONFIG} )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_CURRENT_SOURCE_DIR}/Bin/${OUTPUTCONFIG} )
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
add_link_options(/SUBSYSTEM:WINDOWS)
add_library(${PROJECT_NAME} STATIC ${Headers} ${Source} ${Lib_headers})