slight restructure of CMakeLists
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user