From 0f03c188068fbc3b31d92fa13212c9fce922124f Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Thu, 22 Aug 2024 19:49:30 +0300 Subject: [PATCH] fix regression of build with no hot reload --- CMakeLists.txt | 7 ++++--- townengine/main.c | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee96cf7..0e19bba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,9 +211,6 @@ function(use_townengine target sources output_directory data_dir) # launcher binary, loads game and engine shared library add_executable(${target}_app ${TOWNENGINE_ROOT_DIR}/townengine/null.c) - set_target_properties(${target}_app PROPERTIES - OUTPUT_NAME launcher - LIBRARY_OUTPUT_DIRECTORY ${output_directory}) # put libtownengine.so alongside the binary set_target_properties(${TOWNENGINE_TARGET} PROPERTIES @@ -222,6 +219,10 @@ function(use_townengine target sources output_directory data_dir) add_executable(${target}_app ${sources}) endif () + set_target_properties(${target}_app PROPERTIES + OUTPUT_NAME launcher + LIBRARY_OUTPUT_DIRECTORY ${output_directory}) + # system libraries find_library(MATH_LIBRARY m) if (MATH_LIBRARY) diff --git a/townengine/main.c b/townengine/main.c index fda32fc..a2d9840 100644 --- a/townengine/main.c +++ b/townengine/main.c @@ -478,6 +478,10 @@ static void hot_reload_callback(XWATCHER_FILE_EVENT event, } } +#else + +static void load_game_shared_object(void) {} + #endif