File tree Expand file tree Collapse file tree 4 files changed +21
-9
lines changed Expand file tree Collapse file tree 4 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 1
-
2
1
# $id$ FLUX_SDK_PATH/CMakeLists.txt
3
2
#
4
- # just cascade down to src
5
3
6
- add_subdirectory (src )
4
+ # we are building a "fake" Arduino library so we can compile the code using arduino-cli. This
5
+ # requires a library.properties file in the root of the project. This file i
6
+ configure_file (library.properties ${PROJECT_FLUX_DIRECTORY} COPYONLY )
7
+
8
+ # Now just cascade down to src
9
+
10
+ add_subdirectory (src )
Original file line number Diff line number Diff line change @@ -19,12 +19,18 @@ endmacro ()
19
19
#
20
20
macro (flux_sdk_set_project_directory project_directory )
21
21
22
- set (PROJECT_FLUX_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /${project_directory}/Flux )
22
+ set (PROJECT_FLUX_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /${project_directory}/SparkFun_Flux )
23
23
24
24
if (NOT EXISTS ${PROJECT_FLUX_DIRECTORY} )
25
25
message (STATUS "Creating directory: ${PROJECT_FLUX_DIRECTORY} " )
26
26
file (MAKE_DIRECTORY ${PROJECT_FLUX_DIRECTORY} )
27
27
endif ()
28
+ if (NOT EXISTS ${PROJECT_FLUX_DIRECTORY} /src )
29
+ file (MAKE_DIRECTORY ${PROJECT_FLUX_DIRECTORY} /src )
30
+ endif ()
31
+ if (NOT EXISTS ${PROJECT_FLUX_DIRECTORY} /src/Flux )
32
+ file (MAKE_DIRECTORY ${PROJECT_FLUX_DIRECTORY} /src/Flux )
33
+ endif ()
28
34
29
35
endmacro ()
30
36
# ##################################################################################################
@@ -52,7 +58,7 @@ endfunction ()
52
58
macro (flux_sdk_add_source_files )
53
59
set (list_var "${ARGN} " )
54
60
foreach (arg IN LISTS list_var )
55
- configure_file (${arg} ${PROJECT_FLUX_DIRECTORY} COPYONLY )
61
+ configure_file (${arg} ${PROJECT_FLUX_DIRECTORY} /src/Flux COPYONLY )
56
62
endforeach ()
57
63
endmacro ()
58
64
Original file line number Diff line number Diff line change 1
1
# Add the source files for this directory
2
2
flux_sdk_add_source_files (
3
- Flux.h
4
3
flxBusI2C.cpp
5
4
flxBusI2C.h
6
5
flxBusSPI.cpp
@@ -30,3 +29,6 @@ flux_sdk_add_source_files(
30
29
flxUtils.cpp
31
30
flxUtils.h
32
31
spSpark.cpp )
32
+
33
+ # the flux include file is special - its our hook for the Arduino "library" being created
34
+ configure_file (Flux.h ${PROJECT_FLUX_DIRECTORY} /src COPYONLY )
Original file line number Diff line number Diff line change 16
16
17
17
#pragma once
18
18
19
- #include "flxCore.h"
20
- #include "flxDevice.h"
21
- #include "flxFlux.h"
19
+ #include "Flux/ flxCore.h"
20
+ #include "Flux/ flxDevice.h"
21
+ #include "Flux/ flxFlux.h"
You can’t perform that action at this time.
0 commit comments