diff --git a/src/displayapp/UserApps.h b/src/displayapp/UserApps.h.in similarity index 82% rename from src/displayapp/UserApps.h rename to src/displayapp/UserApps.h.in index 61987461..a2461090 100644 --- a/src/displayapp/UserApps.h +++ b/src/displayapp/UserApps.h.in @@ -1,19 +1,13 @@ #pragma once #include "displayapp/apps/Apps.h" -#include "Controllers.h" +#include "displayapp/Controllers.h" #include "displayapp/screens/Alarm.h" #include "displayapp/screens/Dice.h" #include "displayapp/screens/Timer.h" #include "displayapp/screens/Twos.h" #include "displayapp/screens/Tile.h" -#include "displayapp/screens/ApplicationList.h" -#include "displayapp/screens/WatchFaceDigital.h" -#include "displayapp/screens/WatchFaceAnalog.h" -#include "displayapp/screens/WatchFaceCasioStyleG7710.h" -#include "displayapp/screens/WatchFaceInfineat.h" -#include "displayapp/screens/WatchFacePineTimeStyle.h" -#include "displayapp/screens/WatchFaceTerminal.h" +@WATCHFACE_INCLUDE@ namespace Pinetime { namespace Applications { diff --git a/src/displayapp/apps/CMakeLists.txt b/src/displayapp/apps/CMakeLists.txt index 07cd4b03..c28cabdb 100644 --- a/src/displayapp/apps/CMakeLists.txt +++ b/src/displayapp/apps/CMakeLists.txt @@ -49,12 +49,17 @@ foreach (w IN LISTS DEFAULT_WATCHFACE_TYPES) string(SUBSTRING ${w} ${beginIndex} ${watchfaceLength} className) string(SUBSTRING ${w} 0 ${classIndex} namespaceName) string(APPEND WATCHFACE_NAMESPACE "namespace ${namespaceName} { class ${className}; }\n") + + # TODO the include path should be specified by the CMake file of the watchface + string(APPEND WATCHFACE_INCLUDE "#include \"displayapp/screens/${className}.h\"\n") endforeach () add_library(infinitime_apps INTERFACE) target_sources(infinitime_apps INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/Apps.h") target_include_directories(infinitime_apps INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/") +target_include_directories(infinitime_apps INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/../") # Generate the list of user apps to be compiled into the firmware configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Apps.h.in ${CMAKE_CURRENT_BINARY_DIR}/Apps.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/WatchFaces.h.in ${CMAKE_CURRENT_BINARY_DIR}/WatchFaces.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../UserApps.h.in ${CMAKE_CURRENT_BINARY_DIR}/../UserApps.h)