Project restructuring (fixes macOS builds) (#198)

- Create `Include/` folder for all main projects
- Fix some issues here and there (found while moving things)
- All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
This commit is contained in:
Ken Van Hoeylandt
2025-02-01 18:13:20 +01:00
committed by GitHub
parent 7856827ecf
commit c87200a80d
350 changed files with 967 additions and 870 deletions
+4 -6
View File
@@ -13,7 +13,7 @@ if (DEFINED ENV{ESP_IDF_VERSION})
idf_component_register(
SRCS ${SOURCE_FILES}
INCLUDE_DIRS "Source/"
INCLUDE_DIRS "Include/"
PRIV_INCLUDE_DIRS "Private/"
REQUIRES ${REQUIRES_LIST}
)
@@ -25,31 +25,29 @@ if (DEFINED ENV{ESP_IDF_VERSION})
fatfs_create_spiflash_image(data "${CMAKE_CURRENT_SOURCE_DIR}/../Data/data" FLASH_IN_PROJECT PRESERVE_TIME)
endif()
add_definitions(-DESP_PLATFORM)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(${COMPONENT_LIB} PUBLIC -Wno-unused-variable)
endif()
else()
file(GLOB_RECURSE SOURCES "Source/*.c*")
file(GLOB_RECURSE HEADERS "Source/*.h*")
add_library(TactilityHeadless OBJECT)
target_sources(TactilityHeadless
PRIVATE ${SOURCES}
PUBLIC ${HEADERS}
)
include_directories(
Private/
Include/
)
target_include_directories(TactilityHeadless
PUBLIC Source/
PUBLIC Include/
)
add_definitions(-D_Nullable=)
add_definitions(-D_Nonnull=)
target_link_libraries(TactilityHeadless
PUBLIC TactilityCore
PUBLIC freertos_kernel