Skip to content

Commit 4c83aa6

Browse files
committed
Another CMake update
1 parent 4fd7231 commit 4c83aa6

File tree

7 files changed

+48
-48
lines changed

7 files changed

+48
-48
lines changed

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cmake_policy(SET CMP0072 OLD) #not yet, would need to get pointers to all OpenGL
88
set(OpenGL_GL_PREFERENCE LEGACY)
99
#cmake_policy(SET CMP )
1010

11-
project(Irrlicht LANGUAGES CXX C)
11+
project(Nabla LANGUAGES CXX C)
1212

1313

1414
find_package(Vulkan)
@@ -65,8 +65,8 @@ set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11, but
6565
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
6666

6767
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;")
68-
set(LLVM_USE_CRT_DEBUG MTd CACHE STRING "IrrBAW developer note: No idea what subfolder provides this")
69-
set(LLVM_USE_CRT_RELEASE MT CACHE STRING "IrrBAW developer note: No idea what subfolder provides this")
68+
set(LLVM_USE_CRT_DEBUG MTd CACHE STRING "Nabla developer note: No idea what subfolder provides this")
69+
set(LLVM_USE_CRT_RELEASE MT CACHE STRING "Nabla developer note: No idea what subfolder provides this")
7070

7171
if(NOT CMAKE_BUILD_TYPE)
7272
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Debug or Release" FORCE)
@@ -155,7 +155,7 @@ macro(nbl_adjust_flags)
155155
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /INCREMENTAL:NO /LTCG:incremental")
156156

157157
else()
158-
message(WARNING "UNTESTED COMPILER DETECTED, EXPECT WRONG OPTIMIZATION FLAGS! SUBMIT ISSUE ON GITHUB https://github.com/buildaworldnet/IrrlichtBAW/issues")
158+
message(WARNING "UNTESTED COMPILER DETECTED, EXPECT WRONG OPTIMIZATION FLAGS! SUBMIT ISSUE ON GITHUB https://github.com/Devsh-Graphics-Programming/Nabla/issues")
159159
endif()
160160
endmacro()
161161

@@ -198,9 +198,9 @@ option(NBL_BUILD_EXAMPLES "Enable building examples" ON)
198198

199199
option(NBL_BUILD_TOOLS "Enable building tools (just convert2BAW as for now)" ON)
200200

201-
option(NBL_BUILD_MITSUBA_LOADER "Enable irr::ext::MitsubaLoader?" ON)
201+
option(NBL_BUILD_MITSUBA_LOADER "Enable nbl::ext::MitsubaLoader?" ON)
202202

203-
option(NBL_BUILD_RADEON_RAYS "Enable irr::ext::RadeonRays?" OFF)
203+
option(NBL_BUILD_RADEON_RAYS "Enable nbl::ext::RadeonRays?" OFF)
204204

205205
if (NBL_COMPILE_WITH_CUDA)
206206
find_package(OPTIX)
@@ -209,7 +209,7 @@ if (NBL_COMPILE_WITH_CUDA)
209209
else()
210210
message(STATUS "OptiX not found")
211211
endif()
212-
option(NBL_BUILD_OPTIX "Enable irr::ext::OptiX?" OFF)
212+
option(NBL_BUILD_OPTIX "Enable nbl::ext::OptiX?" OFF)
213213
else()
214214
message(STATUS "Because NBL_COMPILE_WITH_CUDA is not enabled, the NBL_BUILD_OPTIX option will be hidden.")
215215
endif()
@@ -232,7 +232,7 @@ add_subdirectory(${THIRD_PARTY_SOURCE_DIR})
232232
OPTION(NBL_EMBED_BUILTIN_RESOURCES "Embed built-in resources?" ON)
233233

234234

235-
add_subdirectory(src/nbl) # Irrlicht code | Moved cmakelists.txt from source/Nabla to src/nbl
235+
add_subdirectory(src/nbl) # Nabla code | Moved cmakelists.txt from source/Nabla to src/nbl
236236

237237

238238

cmake/common.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ macro(nbl_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDE
4141
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
4242

4343
# EXTRA_SOURCES is var containing non-common names of sources (if any such sources, then EXTRA_SOURCES must be set before including this cmake code)
44-
add_dependencies(${EXECUTABLE_NAME} Irrlicht)
44+
add_dependencies(${EXECUTABLE_NAME} Nabla)
4545

4646
target_include_directories(${EXECUTABLE_NAME}
4747
PUBLIC ../../include
4848
PRIVATE ${_EXTRA_INCLUDES}
4949
)
50-
target_link_libraries(${EXECUTABLE_NAME} Irrlicht ${_EXTRA_LIBS}) # see, this is how you should code to resolve github issue 311
51-
if (IRR_COMPILE_WITH_OPENGL)
50+
target_link_libraries(${EXECUTABLE_NAME} Nabla ${_EXTRA_LIBS}) # see, this is how you should code to resolve github issue 311
51+
if (NBL_COMPILE_WITH_OPENGL)
5252
find_package(OpenGL REQUIRED)
5353
target_link_libraries(${EXECUTABLE_NAME} ${OPENGL_LIBRARIES})
5454
endif()
@@ -63,10 +63,10 @@ macro(nbl_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDE
6363
set(COMMON_LINKER_OPTIONS "-msse4.2 -mfpmath=sse -fuse-ld=gold")
6464
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${COMMON_LINKER_OPTIONS}")
6565
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${COMMON_LINKER_OPTIONS} -fstack-protector-strong")
66-
if (IRR_GCC_SANITIZE_ADDRESS)
66+
if (NBL_GCC_SANITIZE_ADDRESS)
6767
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address")
6868
endif()
69-
if (IRR_GCC_SANITIZE_THREAD)
69+
if (NBL_GCC_SANITIZE_THREAD)
7070
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=thread")
7171
endif()
7272
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.1)
@@ -160,19 +160,19 @@ macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
160160

161161
add_library(${LIB_NAME} ${LIB_SOURCES})
162162
# EXTRA_SOURCES is var containing non-common names of sources (if any such sources, then EXTRA_SOURCES must be set before including this cmake code)
163-
add_dependencies(${LIB_NAME} Irrlicht)
163+
add_dependencies(${LIB_NAME} Nabla)
164164

165165
target_include_directories(${LIB_NAME}
166166
PUBLIC ${CMAKE_BINARY_DIR}/include/nbl/config/debug
167167
PUBLIC ${CMAKE_BINARY_DIR}/include/nbl/config/release
168168
PUBLIC ${CMAKE_BINARY_DIR}/include/nbl/config/relwithdebinfo
169169
PUBLIC ${CMAKE_SOURCE_DIR}/include
170170
PUBLIC ${CMAKE_SOURCE_DIR}/src
171-
PUBLIC ${CMAKE_SOURCE_DIR}/source/Irrlicht
171+
PUBLIC ${CMAKE_SOURCE_DIR}/source/Nabla
172172
PRIVATE ${LIB_INCLUDES}
173173
)
174-
add_dependencies(${LIB_NAME} Irrlicht)
175-
target_link_libraries(${LIB_NAME} PUBLIC Irrlicht)
174+
add_dependencies(${LIB_NAME} Nabla)
175+
target_link_libraries(${LIB_NAME} PUBLIC Nabla)
176176
target_compile_options(${LIB_NAME} PUBLIC ${LIB_OPTIONS})
177177
set_target_properties(${LIB_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
178178

@@ -240,7 +240,7 @@ macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
240240
set("NBL_EXT_${EXT_NAME}_INCLUDE_DIRS"
241241
"${NBL_ROOT_PATH}/include/"
242242
"${NBL_ROOT_PATH}/src"
243-
"${NBL_ROOT_PATH}/source/Irrlicht"
243+
"${NBL_ROOT_PATH}/source/Nabla"
244244
"${NBL_ROOT_PATH}/ext/${EXT_NAME}"
245245
"${LIB_INCLUDES}"
246246
PARENT_SCOPE

examples_tests/22.RaytracedAO/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ set(RAY_TRACED_AO_EXAMPLE_INCLUDE_DIRS
1616
${NBL_EXT_MITSUBA_LOADER_INCLUDE_DIRS}
1717
)
1818

19-
if(IRR_BUILD_OPTIX)
19+
if(NBL_BUILD_OPTIX)
2020
set(RAY_TRACED_AO_EXAMPLE_LIBS
2121
${RAY_TRACED_AO_EXAMPLE_LIBS}
2222
${NBL_EXT_OPTIX_LIB}

examples_tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ add_subdirectory(01.HelloWorld EXCLUDE_FROM_ALL)
66
add_subdirectory(02.ComputeShader EXCLUDE_FROM_ALL)
77
add_subdirectory(03.GPU_Mesh EXCLUDE_FROM_ALL)
88
# free space 04
9-
add_subdirectory(05.IrrlichtBaWTutorialExample EXCLUDE_FROM_ALL)
9+
add_subdirectory(05.NablaTutorialExample EXCLUDE_FROM_ALL)
1010
add_subdirectory(06.MeshLoaders EXCLUDE_FROM_ALL)
1111
#add_subdirectory(07.HardwareSkinning EXCLUDE_FROM_ALL)
1212
add_subdirectory(08.HardwareInstancing EXCLUDE_FROM_ALL)

src/nbl/CMakeLists.txt

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ endif()
8484

8585
set(_NBL_EMBED_BUILTIN_RESOURCES_ ${NBL_EMBED_BUILTIN_RESOURCES})
8686

87-
#set(_NBL_TARGET_ARCH_ARM_ ${IRR_TARGET_ARCH_ARM}) #uncomment in the future
88-
set(__NBL_FAST_MATH ${IRR_FAST_MATH})
87+
#set(_NBL_TARGET_ARCH_ARM_ ${NBL_TARGET_ARCH_ARM}) #uncomment in the future
88+
set(__NBL_FAST_MATH ${NBL_FAST_MATH})
8989
set(_NBL_DEBUG 0)
9090
set(_NBL_RELWITHDEBINFO 0)
9191
configure_file("${NBL_ROOT_PATH}/include/nbl/config/BuildConfigOptions.h.in" "${NABLA_CONF_DIR_RELEASE}/BuildConfigOptions.h")
@@ -364,7 +364,7 @@ macro(nbl_target_link_gli _trgt)
364364
target_include_directories(${_trgt} PUBLIC ${THIRD_PARTY_SOURCE_DIR}/gli)
365365
endmacro()
366366

367-
add_library(Irrlicht STATIC
367+
add_library(Nabla STATIC
368368
${NABLA_SRCS_COMMON}
369369
${NABLA_SRCS_NORMAL}
370370
${NABLA_HEADERS}
@@ -377,23 +377,23 @@ add_library(Irrlicht STATIC
377377
)
378378

379379
#TODO maybe make a macro to do this (note: it's also used in common.cmake)
380-
set_property(TARGET Irrlicht PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
381-
382-
add_dependencies(Irrlicht openssl_build)
383-
nbl_target_link_zlib(Irrlicht)
384-
nbl_target_link_openssl(Irrlicht)
385-
nbl_target_link_shaderc(Irrlicht)
386-
nbl_target_link_libjpeg(Irrlicht)
387-
nbl_target_link_libpng(Irrlicht)
388-
nbl_target_link_openexr(Irrlicht)
380+
set_property(TARGET Nabla PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
381+
382+
add_dependencies(Nabla openssl_build)
383+
nbl_target_link_zlib(Nabla)
384+
nbl_target_link_openssl(Nabla)
385+
nbl_target_link_shaderc(Nabla)
386+
nbl_target_link_libjpeg(Nabla)
387+
nbl_target_link_libpng(Nabla)
388+
nbl_target_link_openexr(Nabla)
389389
if(_NBL_COMPILE_WITH_GLI_)
390-
nbl_target_link_gli(Irrlicht)
390+
nbl_target_link_gli(Nabla)
391391
endif()
392-
nbl_target_include_parallel_hashmap(Irrlicht)
392+
nbl_target_include_parallel_hashmap(Nabla)
393393

394-
target_link_libraries(Irrlicht INTERFACE ${OPENGL_gl_LIBRARY})
394+
target_link_libraries(Nabla INTERFACE ${OPENGL_gl_LIBRARY})
395395
if (UNIX)
396-
target_link_libraries(Irrlicht INTERFACE
396+
target_link_libraries(Nabla INTERFACE
397397
${X11_LIBRARIES}
398398
${X11_Xrandr_LIB}
399399
${X11_Xxf86vm_LIB}
@@ -403,7 +403,7 @@ if (UNIX)
403403
)
404404
endif()
405405

406-
target_include_directories(Irrlicht PUBLIC
406+
target_include_directories(Nabla PUBLIC
407407
${NBL_ROOT_PATH}/include
408408
${COMMON_INCLUDE_DIRS}
409409
${THIRD_PARTY_SOURCE_DIR}
@@ -412,39 +412,39 @@ target_include_directories(Irrlicht PUBLIC
412412
"$<$<CONFIG:RELEASE>:${NABLA_CONF_DIR_RELEASE}>"
413413
"$<$<CONFIG:RELWITHDEBINFO>:${NABLA_CONF_DIR_RELWITHDEBINFO}>"
414414
)
415-
target_include_directories(Irrlicht PUBLIC ${NBL_ROOT_PATH}/src ${NBL_ROOT_PATH}/source/Nabla ${NBL_ROOT_PATH}/src/3rdparty) # this should be PRIVATE, but things from /src (or /source) are sometimes included in things in /include and so examples have to put source dirs into theirs Include Path
416-
target_include_directories(Irrlicht PRIVATE ${CMAKE_BINARY_DIR}/include)
415+
target_include_directories(Nabla PUBLIC ${NBL_ROOT_PATH}/src ${NBL_ROOT_PATH}/source/Nabla ${NBL_ROOT_PATH}/src/3rdparty) # this should be PRIVATE, but things from /src (or /source) are sometimes included in things in /include and so examples have to put source dirs into theirs Include Path
416+
target_include_directories(Nabla PRIVATE ${CMAKE_BINARY_DIR}/include)
417417
if (UNIX)
418-
target_include_directories(Irrlicht PUBLIC
418+
target_include_directories(Nabla PUBLIC
419419
${X11_INCLUDE_DIR}
420420
${X11_Xrandr_INCLUDE_PATH}
421421
${X11_xf86vmode_INCLUDE_PATH})
422422
endif()
423423

424424

425425
if (NBL_COMPILE_WITH_CUDA)
426-
target_include_directories(Irrlicht PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
426+
target_include_directories(Nabla PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
427427
endif()
428428

429-
target_compile_definitions(Irrlicht
429+
target_compile_definitions(Nabla
430430
PRIVATE _NBL_STATIC_LIB_ SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
431431
PUBLIC UNW_LOCAL_ONLY
432432
)
433433

434434
if (MSVC) #on MSVC it won't compile without this option!
435-
target_compile_options(Irrlicht PUBLIC /bigobj)
435+
target_compile_options(Nabla PUBLIC /bigobj)
436436
endif()
437437

438438
#precompiled headers
439439
if(NBL_PCH)
440-
target_precompile_headers(Irrlicht PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/pch.h")
440+
target_precompile_headers(Nabla PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/pch.h")
441441
endif()
442442

443443

444444
if(NBL_EMBED_BUILTIN_RESOURCES)
445445
add_custom_target(builtin_resources
446446
DEPENDS ${CMAKE_BINARY_DIR}/include/nbl/builtin/builtinResources.h ${CMAKE_CURRENT_BINARY_DIR}/builtin/builtinResourceData.cpp)
447-
add_dependencies(Irrlicht builtin_resources)
447+
add_dependencies(Nabla builtin_resources)
448448
elseif()
449449
foreach(X IN LISTS nbl_resources_to_embed)
450450
list(APPEND NABLA_HEADERS_PUBLIC ${NBL_ROOT_PATH}/include/${X})
@@ -471,9 +471,9 @@ macro(nbl_install_lib _TRGT)
471471
install(TARGETS ${_TRGT} ARCHIVE DESTINATION relwithdebinfo/lib CONFIGURATIONS RelWithDebInfo)
472472
endmacro()
473473
# Install main lib
474-
set_target_properties(Irrlicht PROPERTIES DEBUG_POSTFIX _debug)
475-
set_target_properties(Irrlicht PROPERTIES RELWITHDEBDINFO_POSTFIX _relwithdebinfo)
476-
nbl_install_lib(Irrlicht)
474+
set_target_properties(Nabla PROPERTIES DEBUG_POSTFIX _debug)
475+
set_target_properties(Nabla PROPERTIES RELWITHDEBDINFO_POSTFIX _relwithdebinfo)
476+
nbl_install_lib(Nabla)
477477

478478
#install dependencies
479479
nbl_install_lib(glslang)

0 commit comments

Comments
 (0)