input system rework
This commit is contained in:
@ -26,8 +26,9 @@ set(TWN_TARGET townengine CACHE INTERNAL "")
|
||||
set(TWN_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
|
||||
|
||||
# feature configuration, set them with -DFEATURE=ON/OFF in cli
|
||||
option(TWN_FEATURE_DYNLIB_GAME "Enable dynamic library loading support" ON)
|
||||
option(TWN_USE_AMALGAM "Enable use of twn_amalgam.c as a single compilation unit" ON)
|
||||
option(TWN_USE_AMALGAM "Enable use of twn_amalgam.c as a single compilation unit" ON)
|
||||
option(TWN_FEATURE_DYNLIB_GAME "Enable dynamic library loading support" ON)
|
||||
set(TWN_OUT_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Artifact destination")
|
||||
|
||||
# todo: figure out how to compile for dynamic linking instead
|
||||
if(EMSCRIPTEN)
|
||||
@ -270,7 +271,9 @@ function(link_deps target)
|
||||
endfunction()
|
||||
|
||||
|
||||
function(use_townengine target sources output_directory)
|
||||
function(use_townengine sources output_directory)
|
||||
cmake_path(GET TWN_OUT_DIR STEM LAST_ONLY target)
|
||||
|
||||
if(TWN_FEATURE_DYNLIB_GAME)
|
||||
# game shared library, for reloading
|
||||
add_library(${target}_game SHARED ${sources})
|
||||
|
Reference in New Issue
Block a user