aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJakob Stendahl <14180120+JakobST1n@users.noreply.github.com>2021-06-08 00:59:02 +0200
committerGitHub <noreply@github.com>2021-06-08 00:59:02 +0200
commit26d844c4149af823cd84e68417a5722352346ba7 (patch)
tree551cb9c8ebb59a676c04ee4a05993d112491f231 /CMakeLists.txt
parent4d417f386472502636fe8e3e9b9be5ae8442aa77 (diff)
parentba195268ca0778fccc30d13356c40b0f0c7fe848 (diff)
downloadhoverbit-ble-1.0.0.tar.gz
hoverbit-ble-1.0.0.zip
Merge pull request #8 from JakobST1n/dev1.0.0
Dev
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 2 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac32e4b..e2130f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,7 @@ sbeParseJson(codal codal_json)
set(CODAL_APP_OUTPUT_DIR ".")
set(CODAL_APP_SOURCE_DIR "source")
+set(CODAL_APP_INCLUDE_DIR "inc")
if("${codal.application}" STRGREATER "")
set(CODAL_APP_SOURCE_DIR "${codal.application}")
@@ -81,17 +82,6 @@ SET(CODAL_OUTPUT_NAME ${device.device})
SET(CODAL_TARGET_PROCESSOR ${device.processor})
SET(CODAL_TARGET_CPU_ARCHITECTURE ${device.architecture})
-# if this is the first build, lets copy a sample main.cpp from the target if available.
-if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${CODAL_APP_SOURCE_DIR} AND EXISTS ${CMAKE_CURRENT_LIST_DIR}/${LIB_DEST}/${codal.target.name}/samples/main.cpp)
- FILE(COPY ${CMAKE_CURRENT_LIST_DIR}/${LIB_DEST}/${codal.target.name}/samples/main.cpp DESTINATION ${CMAKE_CURRENT_LIST_DIR}/${CODAL_APP_SOURCE_DIR})
-endif()
-
-#copy samples and remove main.cpp
-if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/samples AND EXISTS ${CMAKE_CURRENT_LIST_DIR}/${LIB_DEST}/${codal.target.name}/samples/)
- FILE(COPY ${CMAKE_CURRENT_LIST_DIR}/${LIB_DEST}/${codal.target.name}/samples DESTINATION ${CMAKE_CURRENT_LIST_DIR})
- FILE(REMOVE ${CMAKE_CURRENT_LIST_DIR}/samples/main.cpp)
-endif()
-
####################
SET(TOOLCHAIN ${device.toolchain})
@@ -231,7 +221,7 @@ if("${device.libraries}" STRGREATER "")
endif()
#finally, find sources and includes of the application, and create a target.
-RECURSIVE_FIND_DIR(INCLUDE_DIRS "./inc" "${PROJECT_SOURCE_DIR}/${CODAL_APP_SOURCE_DIR}" "*.h")
+RECURSIVE_FIND_DIR(INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/${CODAL_APP_INCLUDE_DIR}" "*.h")
# *.c?? only catches .cpp, not .c, so let's be precise
RECURSIVE_FIND_FILE(SOURCE_FILES "${PROJECT_SOURCE_DIR}/${CODAL_APP_SOURCE_DIR}" "*.cpp")