Actually use SKIP_DATA variable when adding platform executable
This commit is contained in:
parent
d9d2d5b85d
commit
5db6f02742
5 changed files with 15 additions and 5 deletions
|
@ -51,7 +51,7 @@ function(add_platform_executable)
|
|||
endif()
|
||||
|
||||
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()
|
||||
|
||||
set_output_dir(${add_platform_executable_TARGET})
|
||||
|
|
|
@ -6,7 +6,8 @@ add_platform_executable(
|
|||
TARGET ExampleApp
|
||||
APP_CLASS ExampleApp
|
||||
APP_INCLUDE example.hpp
|
||||
SRC ${SRC})
|
||||
SRC ${SRC}
|
||||
SKIP_DATA OFF)
|
||||
target_link_libraries(ExampleApp PUBLIC
|
||||
Core)
|
||||
target_include_directories(ExampleApp PUBLIC
|
||||
|
|
|
@ -43,7 +43,7 @@ add_platform(
|
|||
${EXTRA_LIBRARIES}
|
||||
)
|
||||
|
||||
function(add_platform_commands target data_directory)
|
||||
function(add_platform_commands target data_directory skip_data)
|
||||
if(ENABLE_MACOS)
|
||||
set(DUMMY_NAME ${target}-CopyShaders)
|
||||
|
||||
|
@ -57,7 +57,7 @@ function(add_platform_commands target data_directory)
|
|||
add_dependencies(${target} ${DUMMY_NAME})
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_DATA)
|
||||
if(NOT skip_data)
|
||||
if(ENABLE_MACOS)
|
||||
add_custom_target(${target}_copy_assets
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${data_directory} $<TARGET_FILE_DIR:${target}>/../Resources/data
|
||||
|
|
8
tools/assetpipeline/CMakeLists.txt
Normal file
8
tools/assetpipeline/CMakeLists.txt
Normal 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)
|
|
@ -4,7 +4,8 @@ add_platform_executable(
|
|||
APP_INCLUDE modeleditor.hpp
|
||||
SRC
|
||||
src/modeleditor.cpp
|
||||
include/modeleditor.hpp)
|
||||
include/modeleditor.hpp
|
||||
SKIP_DATA TRUE)
|
||||
target_link_libraries(ModelCompiler PUBLIC
|
||||
Core
|
||||
EditorCommon
|
||||
|
|
Reference in a new issue