-
Notifications
You must be signed in to change notification settings - Fork 221
/
CMakeLists.txt
51 lines (47 loc) · 1.9 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
# Copyright (c) Martin Schweiger
# Licensed under the MIT License
include(ExternalProject)
add_subdirectory(Date)
add_subdirectory(meshc)
add_subdirectory(Pltex)
add_subdirectory(Shipedit)
add_subdirectory(texpack)
#add_subdirectory(tileedit/qt)
# We do this as an external project to invoke x64 toolchain
ExternalProject_Add(plsplit
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/plsplit
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/plsplit
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/plsplit
INSTALL_DIR ${ORBITER_INSTALL_UTILS_DIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DINSTALLDIR=${ORBITER_INSTALL_UTILS_DIR}
BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/plsplit --config Release
INSTALL_COMMAND ""
)
# Install project output from here instead from inside the external project
# to make cpack aware of it
if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/plsplit/plsplit.exe)
install(PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/plsplit/plsplit.exe
plsplit/DxTex.exe
DESTINATION ${ORBITER_INSTALL_UTILS_DIR}
)
endif()
# tileedit is another 64-bit project. This also requires
# Qt5 so will only be built if that is available
ExternalProject_Add(tileedit_proj
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/tileedit/qt
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/tileedit/qt
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tileedit/qt
INSTALL_DIR ${ORBITER_INSTALL_UTILS_DIR}
CMAKE_ARGS -DCMAKE_CFG_INTDIR=Release -DQTDIR:PATH=${Qt5_x64_DIR} -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DINSTALLDIR=${ORBITER_INSTALL_UTILS_DIR}
BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/tileedit/qt --config Release
INSTALL_COMMAND ""
)
# Install project output from here instead from inside the external project
# to make cpack aware of it
if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/tileedit/qt/src/tmp)
install(DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/tileedit/qt/src/tmp/
DESTINATION ${ORBITER_INSTALL_UTILS_DIR}
)
endif()