Archived
1
Fork 0

Actually use SKIP_DATA variable when adding platform executable

This commit is contained in:
Joshua Goins 2022-05-21 17:47:15 -04:00
parent d9d2d5b85d
commit 5db6f02742
5 changed files with 15 additions and 5 deletions

View file

@ -51,7 +51,7 @@ function(add_platform_executable)
endif() endif()
if(COMMAND add_platform_commands) if(COMMAND add_platform_commands)
add_platform_commands(${add_platform_executable_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/data) add_platform_commands(${add_platform_executable_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/game ${add_platform_executable_SKIP_DATA})
endif() endif()
set_output_dir(${add_platform_executable_TARGET}) set_output_dir(${add_platform_executable_TARGET})

View file

@ -6,7 +6,8 @@ add_platform_executable(
TARGET ExampleApp TARGET ExampleApp
APP_CLASS ExampleApp APP_CLASS ExampleApp
APP_INCLUDE example.hpp APP_INCLUDE example.hpp
SRC ${SRC}) SRC ${SRC}
SKIP_DATA OFF)
target_link_libraries(ExampleApp PUBLIC target_link_libraries(ExampleApp PUBLIC
Core) Core)
target_include_directories(ExampleApp PUBLIC target_include_directories(ExampleApp PUBLIC

View file

@ -43,7 +43,7 @@ add_platform(
${EXTRA_LIBRARIES} ${EXTRA_LIBRARIES}
) )
function(add_platform_commands target data_directory) function(add_platform_commands target data_directory skip_data)
if(ENABLE_MACOS) if(ENABLE_MACOS)
set(DUMMY_NAME ${target}-CopyShaders) set(DUMMY_NAME ${target}-CopyShaders)
@ -57,7 +57,7 @@ function(add_platform_commands target data_directory)
add_dependencies(${target} ${DUMMY_NAME}) add_dependencies(${target} ${DUMMY_NAME})
endif() endif()
if(NOT SKIP_DATA) if(NOT skip_data)
if(ENABLE_MACOS) if(ENABLE_MACOS)
add_custom_target(${target}_copy_assets add_custom_target(${target}_copy_assets
COMMAND ${CMAKE_COMMAND} -E copy_directory ${data_directory} $<TARGET_FILE_DIR:${target}>/../Resources/data COMMAND ${CMAKE_COMMAND} -E copy_directory ${data_directory} $<TARGET_FILE_DIR:${target}>/../Resources/data

View file

@ -0,0 +1,8 @@
add_executable(AssetPipeline src/main.cpp)
target_link_libraries(AssetPipeline
PRIVATE
Log
Utility)
set_engine_properties(AssetPipeline)
set_output_dir(AssetPipeline)
add_dependencies(AssetPipeline ModelCompiler)

View file

@ -4,7 +4,8 @@ add_platform_executable(
APP_INCLUDE modeleditor.hpp APP_INCLUDE modeleditor.hpp
SRC SRC
src/modeleditor.cpp src/modeleditor.cpp
include/modeleditor.hpp) include/modeleditor.hpp
SKIP_DATA TRUE)
target_link_libraries(ModelCompiler PUBLIC target_link_libraries(ModelCompiler PUBLIC
Core Core
EditorCommon EditorCommon