Skip to content

Commit

Permalink
fixes for clion/cmdline build
Browse files Browse the repository at this point in the history
environment wasn't parsed properly
  • Loading branch information
KenVanHoeylandt committed Jan 25, 2024
1 parent de64647 commit fb0c022
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ cmake_minimum_required(VERSION 3.16)

add_definitions(-DTT_DEBUG)

if ($ENV{ESP_IDF_VERSION})
set(ESP_PLATFORM true)
endif()

if (ESP_PLATFORM)
if (DEFINED ENV{ESP_IDF_VERSION})
message("Building with ESP-IDF v$ENV{ESP_IDF_VERSION}")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

Expand Down Expand Up @@ -42,7 +38,7 @@ add_subdirectory(libs/mlib)
add_subdirectory(tactility)
add_subdirectory(tactility-core)

if (NOT ESP_PLATFORM)
if (NOT DEFINED ENV{ESP_IDF_VERSION})
add_subdirectory(libs/freertos-kernel)
target_include_directories(freertos-kernel
PUBLIC app-sim/src # for FreeRTOSConfig.h
Expand Down
3 changes: 2 additions & 1 deletion tactility-core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.16)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand All @@ -16,7 +17,7 @@ target_include_directories(tactility-core SYSTEM
INTERFACE src/
)

if (ESP_PLATFORM)
if (DEFINED ENV{ESP_IDF_VERSION})
add_definitions(-DESP_PLATFORM)
target_link_libraries(tactility-core
PUBLIC mlib
Expand Down
2 changes: 1 addition & 1 deletion tactility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ target_include_directories(tactility
INTERFACE src/
)

if (ESP_PLATFORM)
if (DEFINED ENV{ESP_IDF_VERSION})
add_definitions(-DESP_PLATFORM)
target_link_libraries(tactility
PUBLIC tactility-core
Expand Down

0 comments on commit fb0c022

Please sign in to comment.