Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ option(NBL_BUILD_BULLET "Enable Bullet Physics building and integration?" OFF)
option(NBL_BUILD_DOCS "Enable building documentation?" OFF) # No one has doxygen installed, plus we dont know when was the last time we generated working doxy and we'll use SphinX in the future
option(NBL_ENABLE_PROJECT_JSON_CONFIG_VALIDATION "" ON)
option(NBL_EMBED_BUILTIN_RESOURCES "Embed built-in resources?" OFF)
set(NBL_NSC_MODE "PACKAGE" CACHE STRING "How to provide the nsc build tool. Valid values: SOURCE and PACKAGE")
set_property(CACHE NBL_NSC_MODE PROPERTY STRINGS SOURCE PACKAGE)
option(NBL_NSC_USE_PACKAGE_BUILTINS "When NBL_NSC_MODE=PACKAGE, use builtin resources embedded in the packaged nsc instead of host checkout builtins." OFF)
option(NBL_ENABLE_DOCKER_INTEGRATION "Enables docker integration, if client is not found Docker Desktop will be installed" OFF)
option(NBL_ENABLE_CONFIG_INSTALL "Install Relocatable NablaConfig.cmake and NablaConfigVersion.cmake scripts" ON)

Expand Down
3 changes: 2 additions & 1 deletion cmake/FindZLIB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ endif()

set(ZLIB_FOUND TRUE)
set(ZLIB_LIBRARY ZLIB::ZLIB)
set(ZLIB_INCLUDE_DIR "${THIRD_PARTY_SOURCE_DIR}/zlib;${THIRD_PARTY_BINARY_DIR}/zlib")
set(ZLIB_INCLUDE_DIR "${THIRD_PARTY_SOURCE_DIR}/zlib;${THIRD_PARTY_BINARY_DIR}/zlib")
set(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
12 changes: 11 additions & 1 deletion cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,16 @@ struct DeviceConfigCaps
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug,RelWithDebInfo>:-fspv-debug=vulkan-with-source>)
endif()

if(NOT NBL_EMBED_BUILTIN_RESOURCES)
set(_NBL_NSC_USE_HOST_BUILTINS FALSE)
if(NBL_NSC_MODE STREQUAL "PACKAGE")
if(NOT NBL_NSC_USE_PACKAGE_BUILTINS)
set(_NBL_NSC_USE_HOST_BUILTINS TRUE)
endif()
elseif(NOT NBL_EMBED_BUILTIN_RESOURCES)
set(_NBL_NSC_USE_HOST_BUILTINS TRUE)
endif()

if(_NBL_NSC_USE_HOST_BUILTINS)
list(APPEND REQUIRED_OPTIONS
-no-nbl-builtins
-isystem "${NBL_ROOT_PATH}/include"
Expand All @@ -1263,6 +1272,7 @@ struct DeviceConfigCaps
-isystem "${NBL_ROOT_PATH_BINARY}/src/nbl/device/include"
)
endif()
unset(_NBL_NSC_USE_HOST_BUILTINS)

set(REQUIRED_SINGLE_ARGS TARGET BINARY_DIR OUTPUT_VAR INPUTS INCLUDE NAMESPACE MOUNT_POINT_DEFINE)
set(OPTIONAL_SINGLE_ARGS GLOB_DIR)
Expand Down
4 changes: 4 additions & 0 deletions tools/nsc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ if(NOT NBL_NSC_MODE MATCHES "^(SOURCE|PACKAGE)$")
message(FATAL_ERROR "Invalid NBL_NSC_MODE=\"${NBL_NSC_MODE}\". Valid values are SOURCE and PACKAGE.")
endif()

if(NBL_NSC_USE_PACKAGE_BUILTINS AND NOT NBL_NSC_MODE STREQUAL "PACKAGE")
message(FATAL_ERROR "NBL_NSC_USE_PACKAGE_BUILTINS=ON requires NBL_NSC_MODE=PACKAGE.")
endif()

if(NBL_ENABLE_CONFIG_INSTALL)
configure_file(
"${NBL_ROOT_PATH}/cmake/NablaNSCHelpers.cmake"
Expand Down
Loading