fix cmakelists.txt

This commit is contained in:
houzh 2023-09-06 19:02:45 +08:00
parent ad54042c8e
commit c6cb6da7b5
3 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
SUBDIRLIST(APPDIRS ${CMAKE_CURRENT_SOURCE_DIR}) SUBDIRLIST(APPDIRS ${CMAKE_CURRENT_SOURCE_DIR})
message("APPDIRS=${APPDIRS}") message("APPDIRS=${APPDIRS}")
if(BUILD_EXAMPLES)
FOREACH(app ${APPDIRS}) FOREACH(app ${APPDIRS})
ADD_SUBDIRECTORY(${app}) ADD_SUBDIRECTORY(${app})
ENDFOREACH() ENDFOREACH()
endif(BUILD_EXAMPLES)

View File

@ -30,6 +30,8 @@ if(NOT ENABLE_PLPLOT)
endif() endif()
add_definitions(--include cdtypes.h) add_definitions(--include cdtypes.h)
add_definitions(--include cdlog.h) add_definitions(--include cdlog.h)
if(BUILD_EXAMPLES)
foreach(Example ${ExamplesFileList}) foreach(Example ${ExamplesFileList})
message(STATUS "\tCreating build rule for ${Example}") message(STATUS "\tCreating build rule for ${Example}")
get_filename_component(ExampleName ${Example} NAME_WE) get_filename_component(ExampleName ${Example} NAME_WE)
@ -41,4 +43,4 @@ foreach(Example ${ExamplesFileList})
add_dependencies(build_app_examples ${ExampleName}) add_dependencies(build_app_examples ${ExampleName})
install(TARGETS ${ExampleName} DESTINATION bin/examples) install(TARGETS ${ExampleName} DESTINATION bin/examples)
endforeach(Example ${ExamplesFileList}) endforeach(Example ${ExamplesFileList})
endif(BUILD_EXAMPLES)

View File

@ -24,7 +24,7 @@ ENDMACRO()
function(CreatePAK project ResourceDIR PakPath rhpath) function(CreatePAK project ResourceDIR PakPath rhpath)
add_custom_target(${project}_assets add_custom_target(${project}_assets
COMMAND ${CMAKE_SOURCE_DIR}/scripts/idgen.py ${project} ${ResourceDIR} ${rhpath} COMMAND ${CMAKE_SOURCE_DIR}/scripts/idgen.py ${project} ${ResourceDIR} ${rhpath}
COMMAND zip -q -r -D -0 ${PakPath} ./ -x "*.swp" ".*" COMMAND zip -q -r -D -0 ${PakPath} ./ -x "*.swp" ".*"
WORKING_DIRECTORY ${ResourceDIR} WORKING_DIRECTORY ${ResourceDIR}
COMMENT "Pckage Assets from ${ResourceDIR} to:${PakPath}") COMMENT "Pckage Assets from ${ResourceDIR} to:${PakPath}")
add_dependencies(${project} ${project}_assets) add_dependencies(${project} ${project}_assets)