CMake template clenaups and script adaptations
This commit is contained in:
1 parent
3087fcea8a
commit
9248925b77
19 files changed
+361
-170
No files matched your search
@@ -17,12 +17,22 @@ endif()
|
||||
|
||||
set_target_properties(hotreload_live_plugin PROPERTIES
|
||||
OUTPUT_NAME "hotreload_live_plugin"
|
||||
WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
WINDOWS_EXPORT_ALL_SYMBOLS OFF)
|
||||
target_include_directories(hotreload_live_plugin PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../HotReload/include)
|
||||
_set_output_dirs(hotreload_live_plugin
|
||||
"${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_SUBDIR}/examples"
|
||||
"${CMAKE_BINARY_DIR}/${LIBRARY_OUTPUT_SUBDIR}/examples")
|
||||
_apply_compile_options(hotreload_live_plugin)
|
||||
hot_reload_enable_patchable_functions(hotreload_live_plugin)
|
||||
|
||||
# Demonstrates the narrower-export pattern (see hot_reload.h's
|
||||
# HOT_RELOAD_EXPORT and this function's own comment in
|
||||
# cmake/HotReload.cmake) -- contrast with HotReloadDemo's PluginV1/
|
||||
# PluginV2, which deliberately leave the GCC/Clang/MinGW default
|
||||
# (export everything) in place to show that style too. Both are
|
||||
# correct; this is the one this project would actually recommend.
|
||||
hot_reload_restrict_exports(hotreload_live_plugin)
|
||||
|
||||
_register_module_target(EXAMPLE hotreload_live_plugin)
|
||||
add_dependencies(all_examples hotreload_live_plugin)
|
||||
@@ -39,9 +39,11 @@
|
||||
* never patched, exactly like plugin_build_marker in
|
||||
* source/examples/HotReloadDemo.
|
||||
*/
|
||||
#include "hot_reload/hot_reload.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
extern "C" int live_tick(int frame)
|
||||
extern "C" HOT_RELOAD_EXPORT int live_tick(int frame)
|
||||
{
|
||||
int multiplier = 2; // <- try changing this
|
||||
int value = frame * multiplier;
|
||||
|
||||
Reference in new issue
Block a user