slight restructure of CMakeLists

This commit is contained in:
2024-08-20 17:50:50 +03:00
parent 2126f3cddb
commit 08fd5970a1
3 changed files with 8 additions and 6 deletions

View File

@ -187,7 +187,9 @@ function(link_and_include_deps target)
endfunction()
function(use_townengine target)
function(use_townengine target sources)
add_executable(${target} ${sources})
# system libraries
find_library(MATH_LIBRARY m)
if(MATH_LIBRARY)
@ -219,7 +221,9 @@ endfunction()
give_options(${TOWNENGINE_TARGET})
link_and_include_deps(${TOWNENGINE_TARGET})
add_subdirectory(apps/testgame)
if (${CMAKE_PROJECT_NAME} MATCHES townengine)
add_subdirectory(apps/testgame)
endif ()
# zip up assets
# currently, you must run cmake from the project root dir for this to work correctly