From f16edcfbef0ee3df1eaa05d2851b439fa1962276 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Mon, 12 Aug 2019 22:37:22 +0200 Subject: [PATCH] another attempt at fixing dependencies --- Samples/SystemExtension/CMakeLists.txt | 9 +++++++++ Samples/WDEF/CMakeLists.txt | 9 +++++++++ cmake/add_application.cmake | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Samples/SystemExtension/CMakeLists.txt b/Samples/SystemExtension/CMakeLists.txt index 65be679085..4ef8b3c696 100644 --- a/Samples/SystemExtension/CMakeLists.txt +++ b/Samples/SystemExtension/CMakeLists.txt @@ -30,6 +30,15 @@ add_executable(SystemExtension SystemExtension.r ShowInitIcon.h) +if(TARGET retrocrt) + # Hack: if we are building as part of the Retro68 source tree, + # make sure the run-time library is already compiled + # (not needed for standalone projects) + add_dependencies(SystemExtension retrocrt) +endif(TARGET retrocrt) + + + set_target_properties(SystemExtension PROPERTIES OUTPUT_NAME SystemExtension.flt diff --git a/Samples/WDEF/CMakeLists.txt b/Samples/WDEF/CMakeLists.txt index 106ae3bc5a..74b177d5ea 100644 --- a/Samples/WDEF/CMakeLists.txt +++ b/Samples/WDEF/CMakeLists.txt @@ -29,6 +29,15 @@ # First, let's build a separate code resource: add_executable(WDEF wdef.c) + +if(TARGET retrocrt) + # Hack: if we are building as part of the Retro68 source tree, + # make sure the run-time library is already compiled + # (not needed for standalone projects) + add_dependencies(WDEF retrocrt) +endif(TARGET retrocrt) + + if(CMAKE_SYSTEM_NAME MATCHES Retro68) set_target_properties(WDEF PROPERTIES # tell wdef.c that it is being compiled as a code resource diff --git a/cmake/add_application.cmake b/cmake/add_application.cmake index 7d75b80059..ab647adc5c 100644 --- a/cmake/add_application.cmake +++ b/cmake/add_application.cmake @@ -78,7 +78,7 @@ function(add_application name) if(TARGET retrocrt) - target_link_libraries(${name} retrocrt) + add_dependencies(${name} retrocrt) endif(TARGET retrocrt) if(CMAKE_SYSTEM_NAME MATCHES Retro68)