From f5e69ea2d948a7dc8b3138cc15db682f671f1c02 Mon Sep 17 00:00:00 2001 From: Eric Paniagua Date: Wed, 2 Sep 2020 11:29:59 -0700 Subject: [PATCH] [WIP] Set up CMake to build the virtual kaleidoscope device / simulator. Signed-off-by: Eric Paniagua --- .gitignore | 5 ++++ CMakeLists.txt | 12 ++++++++ src/CMakeLists.txt | 9 ++++++ src/kaleidoscope/CMakeLists.txt | 38 ++++++++++++++++++++++++ src/kaleidoscope_internal/CMakeLists.txt | 6 ++++ 5 files changed, 70 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/kaleidoscope/CMakeLists.txt create mode 100644 src/kaleidoscope_internal/CMakeLists.txt diff --git a/.gitignore b/.gitignore index d5fe5726..39a340c1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,8 @@ tags **/generated/ **/results/ + +# Ignore cmake generated directories and files. +**/CMakeFiles/ +**/cmake_install.cmake +**/CMakeCache.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..7865b7ed --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,12 @@ +# I don't know what minim is actually required. +# Setting this to the version I'm using while +# writing these files. We can figure out which +# versions we want to support later. -- epan +cmake_minimum_required(VERSION 3.18.2) + +project(kaleidoscope NONE) + +set(KALEIDOSCOPE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}") +set(VIRTUAL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../../../virtual") + +add_subdirectory( src ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..72845c84 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,9 @@ +# I don't know what minim is actually required. +# Setting this to the version I'm using while +# writing these files. We can figure out which +# versions we want to support later. -- epan +cmake_minimum_required(VERSION 3.18.2) + +set(KALEIDOSCOPE_SRC ${CMAKE_CURRENT_SOURCE_DIR}) + +add_subdirectory( kaleidoscope ) diff --git a/src/kaleidoscope/CMakeLists.txt b/src/kaleidoscope/CMakeLists.txt new file mode 100644 index 00000000..9d2cf485 --- /dev/null +++ b/src/kaleidoscope/CMakeLists.txt @@ -0,0 +1,38 @@ +# I don't know what minim is actually required. +# Setting this to the version I'm using while +# writing these files. We can figure out which +# versions we want to support later. -- epan +cmake_minimum_required(VERSION 3.18.2) + +add_library(bitfields bitfields.cpp) +target_include_directories(bitfields + PRIVATE + ${KALEIDOSCOPE_SRC} + "${VIRTUAL_ROOT}/cores/arduino" ) + +add_library(hooks hooks.cpp) +target_include_directories(hooks + PRIVATE + ${KALEIDOSCOPE_SRC} + "${VIRTUAL_ROOT}/cores/arduino" ) + +#add_subdirectory( +# "${KALEIDOSCOPE_SRC}/kaleidoscope_internal" +# "${kaleidoscope_BINARY_DIR}/src/kaleidoscope_internal" ) + +add_library(key_events key_events.cpp) +target_include_directories(key_events + PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/device" + "${KALEIDOSCOPE_SRC}/kaleidocope_internal" + "${VIRTUAL_ROOT}/cores/arduino" ) + +#add_subdirectory( device ) +#add_subdirectory( driver ) +#add_subdirectory( plugin ) +#add_subdirectory( sim ) +#add_subdirectory( simulator ) +#add_subdirectory( testing ) +#add_subdirectory( testing ) +#add_subdirectory( util ) diff --git a/src/kaleidoscope_internal/CMakeLists.txt b/src/kaleidoscope_internal/CMakeLists.txt new file mode 100644 index 00000000..b0ac76d8 --- /dev/null +++ b/src/kaleidoscope_internal/CMakeLists.txt @@ -0,0 +1,6 @@ +# I don't know what minim is actually required. +# Setting this to the version I'm using while +# writing these files. We can figure out which +# versions we want to support later. -- epan +cmake_minimum_required(VERSION 3.18.2) +