23 lines
833 B
Diff
23 lines
833 B
Diff
--- CMakeLists.txt 2019-02-03 11:56:16.000000000 +0100
|
|
+++ - 2019-02-03 19:12:47.221852468 +0100
|
|
@@ -241,11 +241,19 @@
|
|
|
|
# Optimize the models after the modelcompiler is built.
|
|
# This really shouldn't be done inside the source tree...
|
|
+if(CMAKE_CROSSCOMPILING)
|
|
+add_custom_command(TARGET modelcompiler POST_BUILD
|
|
+ COMMAND ${CMAKE_COMMAND} -E env SDL_VIDEODRIVER=dummy modelcompiler -b inplace
|
|
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
+ COMMENT "Optimizing models" VERBATIM
|
|
+)
|
|
+else()
|
|
add_custom_command(TARGET modelcompiler POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E env SDL_VIDEODRIVER=dummy $<TARGET_FILE:modelcompiler> -b inplace
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
COMMENT "Optimizing models" VERBATIM
|
|
)
|
|
+endif()
|
|
|
|
install(TARGETS ${PROJECT_NAME} modelcompiler savegamedump
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|