Skip to content

Commit

Permalink
updated build options
Browse files Browse the repository at this point in the history
  • Loading branch information
navaro committed Feb 4, 2025
1 parent abcd52a commit 207c2f0
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(QoraalEngine LANGUAGES C)

option(CFG_ENGINE_REGISTRY_DISABLE "Disable the engine registry" OFF)

# --------------------
# 1) Fetch the Qoraal repo
# --------------------
Expand All @@ -13,20 +15,27 @@ FetchContent_Declare(
SOURCE_SUBDIR .
)
FetchContent_MakeAvailable(qoraal)
include_directories("${qoraal_SOURCE_DIR}/include")

# Qoraal-Flash repo
FetchContent_Declare(
qoraal_flash
GIT_REPOSITORY https://github.com/navaro/qoraal-flash.git
GIT_TAG main
SOURCE_SUBDIR .
)
FetchContent_MakeAvailable(qoraal_flash)
if(NOT CFG_ENGINE_REGISTRY_DISABLE)
# Qoraal-Flash repo
FetchContent_Declare(
qoraal_flash
GIT_REPOSITORY https://github.com/navaro/qoraal-flash.git
GIT_TAG main
SOURCE_SUBDIR .
)
FetchContent_MakeAvailable(qoraal_flash)
include_directories("${qoraal_flash_SOURCE_DIR}/include")
endif()

# Include directories
include_directories(include)
include_directories("${qoraal_SOURCE_DIR}/include")
include_directories("${qoraal_flash_SOURCE_DIR}/include")


if(CFG_ENGINE_REGISTRY_DISABLE)
add_compile_definitions(CFG_ENGINE_REGISTRY_DISABLE=1)
endif()

# Add subdirectories
add_subdirectory(src)
Expand Down

0 comments on commit 207c2f0

Please sign in to comment.