From 935bb175b104ac2e3f20fd69747c2a496a96cb72 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Sun, 26 Jun 2022 22:05:00 +0200 Subject: [PATCH] cmake: support date submodule include dir Support both the current modified `date/includes` directory and the `date` submodules `date/include` directory. Once https://github.com/InfiniTimeOrg/InfiniTime/pull/1183 is merged and the InfiniTime submodule is checked in also update the GitHub Action and the AUR package. Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/42 --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3619f39..76b90ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,7 +149,13 @@ target_include_directories(infinisim PRIVATE "${InfiniTime_DIR}/src/libs") target_include_directories(infinisim PRIVATE "lv_drivers") # add dates library -target_include_directories(infinisim SYSTEM PRIVATE "${InfiniTime_DIR}/src/libs/date/includes") +if(EXISTS "${InfiniTime_DIR}/src/libs/date/includes") + target_include_directories(infinisim SYSTEM PRIVATE "${InfiniTime_DIR}/src/libs/date/includes") +elseif(EXISTS "${InfiniTime_DIR}/src/libs/date/include") + target_include_directories(infinisim SYSTEM PRIVATE "${InfiniTime_DIR}/src/libs/date/include") +else() + message(FATAL_ERROR "can't find date includes/include directory, is the submodule checked out?") +endif() # add Screens, fonts and icons with a globbing expression, # to enable easier CI test-runs for PRs adding new Screens/Fonts/Icons