# such as `cmake-server`.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
-set(NNCC_PROJECT_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." CACHE
- INTERNAL "Where to find nncc top-level source directory"
+set(NNAS_PROJECT_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." CACHE
+ INTERNAL "Where to find nnas top-level source directory"
)
set(NNCC_EXTERNALS_DIR
- "${NNCC_PROJECT_SOURCE_DIR}/externals" CACHE
+ "${NNAS_PROJECT_SOURCE_DIR}/externals" CACHE
INTERNAL "Where to download external dependencies"
)
set(NNCC_OVERLAY_DIR "${CMAKE_BINARY_DIR}/overlay" CACHE
INTERNAL "Where locally built external dependencies are installed")
+# TODO Remove NNCC_EXTERNALS_DIR
+set(NNAS_EXTERNALS_DIR ${NNCC_EXTERNALS_DIR} CACHE
+ INTERNAL "Where to download external dependencies")
# This allows find_package to access configurations installed inside overlay
list(APPEND CMAKE_PREFIX_PATH "${NNCC_OVERLAY_DIR}")
macro(nnas_include PREFIX)
- include("${NNCC_PROJECT_SOURCE_DIR}/infra/cmake/modules/${PREFIX}.cmake")
+ include("${NNAS_PROJECT_SOURCE_DIR}/infra/cmake/modules/${PREFIX}.cmake")
endmacro(nnas_include)
macro(nncc_find_package PREFIX)
find_package(${PREFIX} CONFIG NO_DEFAULT_PATH
- PATHS ${NNCC_PROJECT_SOURCE_DIR}/infra/nncc/cmake/packages
+ PATHS ${NNAS_PROJECT_SOURCE_DIR}/infra/nncc/cmake/packages
${ARGN}
)
endmacro(nncc_find_package)
#
# TODO Explain how to add a resource in README.md
function(nncc_find_resource NAME)
- set(RESOURCE_DIR "${NNCC_PROJECT_SOURCE_DIR}/res/${NAME}")
+ set(RESOURCE_DIR "${NNAS_PROJECT_SOURCE_DIR}/res/${NAME}")
if(NOT IS_DIRECTORY ${RESOURCE_DIR})
set(${NAME}_FOUND FALSE PARENT_SCOPE)
### Components
###
if(ENABLE_CONTRIB_BUILD)
- add_subdirectory("${NNCC_PROJECT_SOURCE_DIR}/compiler" "${CMAKE_BINARY_DIR}/compiler")
+ add_subdirectory("${NNAS_PROJECT_SOURCE_DIR}/compiler" "${CMAKE_BINARY_DIR}/compiler")
endif(ENABLE_CONTRIB_BUILD)