forked from EasyRPG/Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (53 loc) · 1.69 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
56
57
58
59
cmake_minimum_required(VERSION 3.7)
project(easyrpg-tools VERSION 1.0 LANGUAGES CXX)
option(DISABLE_LMU2PNG "Disable lmu2png converter tool" OFF)
option(DISABLE_PNG2XYZ "Disable png2xyz converter tool" OFF)
option(DISABLE_XYZ2PNG "Disable xyz2png converter tool" OFF)
option(DISABLE_GENCACHE "Disable gencache tool" OFF)
option(DISABLE_XYZCRUSH "Disable xyzcrush tool" OFF)
option(DISABLE_LCFTRANS "Disable lcftrans tool" OFF)
option(DISABLE_LCFVIZ "Disable lcfviz tool" OFF)
if(WIN32)
option(DISABLE_XYZTHUMBNAILER "Disable xyz-thumbnailer plugin" OFF)
endif()
set(CMAKE_MODULE_PATH APPEND "${CMAKE_CURRENT_SOURCE_DIR}/Modules")
function(enable_tool tool)
string(TOUPPER ${tool} tool_upper)
if(NOT DISABLE_${tool_upper})
add_subdirectory(${tool})
endif()
endfunction()
macro(tool_is_enabled tool)
string(TOUPPER ${tool} tool_upper)
if(NOT DISABLE_${tool_upper})
set(TOOL_ENABLED "yes")
else()
set(TOOL_ENABLED "no")
endif()
mark_as_advanced(TOOL_ENABLED)
mark_as_advanced(tool_upper)
endmacro()
foreach(tool lmu2png png2xyz xyz2png gencache xyzcrush lcftrans lcfviz)
enable_tool(${tool})
endforeach()
if(WIN32 AND NOT DISABLE_XYZTHUMBNAILER)
add_subdirectory(xyz-thumbnailer/windows)
endif()
message(STATUS "")
message(STATUS "Summary:")
message(STATUS "========")
message(STATUS "")
message(STATUS " prefix: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "")
message(STATUS "Converters:")
foreach(tool lmu2png png2xyz xyz2png)
tool_is_enabled(${tool})
message(STATUS " ${tool}: ${TOOL_ENABLED}")
endforeach()
message(STATUS "")
message(STATUS "Other:")
foreach(tool xyzcrush gencache lcftrans lcfviz)
tool_is_enabled(${tool})
message(STATUS " ${tool}: ${TOOL_ENABLED}")
endforeach()
message(STATUS "")