Skip to content

Commit c2db650

Browse files
Merge pull request #20 from Przemog1/armageddon
Armageddon
2 parents 2caf5d0 + 43bee94 commit c2db650

File tree

855 files changed

+8407
-9003
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

855 files changed

+8407
-9003
lines changed

3rdparty/CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ if(_NBL_COMPILE_WITH_GLI_)
185185
set(BUILD_TESTING ${_OLD_BUILD_TESTING})
186186
endif()
187187

188-
irr_adjust_flags()
188+
nbl_adjust_flags()
189189

190190
add_library(lzma OBJECT
191191
lzma/C/Alloc.c
@@ -340,72 +340,72 @@ if (NBL_BUILD_CEGUI)
340340
#[[ unsure if needed for now
341341
install(
342342
DIRECTORY ${CEGUI_DEPS_INSTALL_PATH}/include/
343-
DESTINATION ./include/irr/ext/CEGUI/3rdparty
343+
DESTINATION ./include/nbl/ext/CEGUI/3rdparty
344344
CONFIGURATIONS Release
345345
)
346346
install(
347347
DIRECTORY ${CEGUI_DEPS_INSTALL_PATH}/include/
348-
DESTINATION ./debug/include/irr/ext/CEGUI/3rdparty
348+
DESTINATION ./debug/include/nbl/ext/CEGUI/3rdparty
349349
CONFIGURATIONS Debug
350350
)
351351
install(
352352
DIRECTORY ${CEGUI_DEPS_INSTALL_PATH}/lib/
353-
DESTINATION ./lib/irr/ext/CEGUI
353+
DESTINATION ./lib/nbl/ext/CEGUI
354354
CONFIGURATIONS Release
355355
)
356356
install(
357357
DIRECTORY ${CEGUI_DEPS_INSTALL_PATH}/lib/
358-
DESTINATION ./debug/lib/irr/ext/CEGUI
358+
DESTINATION ./debug/lib/nbl/ext/CEGUI
359359
CONFIGURATIONS Debug
360360
)
361361
]]#
362362

363363
# CEGUI headers
364364
install(
365365
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/CEGUI/cegui/cegui/include/CEGUI
366-
DESTINATION ./include/irr/ext/CEGUI
366+
DESTINATION ./include/nbl/ext/CEGUI
367367
CONFIGURATIONS Release
368368
)
369369
install(
370370
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/CEGUI/cegui/cegui/include/CEGUI
371-
DESTINATION ./debug/include/irr/ext/CEGUI
371+
DESTINATION ./debug/include/nbl/ext/CEGUI
372372
CONFIGURATIONS Debug
373373
)
374374
install(
375375
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/CEGUI/cegui/cegui/include/CEGUI
376-
DESTINATION ./relwithdebinfo/include/irr/ext/CEGUI
376+
DESTINATION ./relwithdebinfo/include/nbl/ext/CEGUI
377377
CONFIGURATIONS RelWithDebInfo
378378
)
379379
# CEGUI generated headers
380380
install(
381381
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CEGUI/cegui/cegui/include/CEGUI
382-
DESTINATION ./include/irr/ext/CEGUI
382+
DESTINATION ./include/nbl/ext/CEGUI
383383
CONFIGURATIONS Release
384384
)
385385
install(
386386
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CEGUI/cegui/cegui/include/CEGUI
387-
DESTINATION ./debug/include/irr/ext/CEGUI
387+
DESTINATION ./debug/include/nbl/ext/CEGUI
388388
CONFIGURATIONS Debug
389389
)
390390
install(
391391
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CEGUI/cegui/cegui/include/CEGUI
392-
DESTINATION ./relwithdebinfo/include/irr/ext/CEGUI
392+
DESTINATION ./relwithdebinfo/include/nbl/ext/CEGUI
393393
CONFIGURATIONS RelWithDebInfo
394394
)
395395
# CEGUI libs
396396
install(
397397
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CEGUI/cegui/lib/
398-
DESTINATION ./lib/irr/ext/CEGUI
398+
DESTINATION ./lib/nbl/ext/CEGUI
399399
CONFIGURATIONS Release
400400
)
401401
install(
402402
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CEGUI/cegui/lib/
403-
DESTINATION ./debug/lib/irr/ext/CEGUI
403+
DESTINATION ./debug/lib/nbl/ext/CEGUI
404404
CONFIGURATIONS Debug
405405
)
406406
install(
407407
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CEGUI/cegui/lib/
408-
DESTINATION ./relwithdebinfo/lib/irr/ext/CEGUI
408+
DESTINATION ./relwithdebinfo/lib/nbl/ext/CEGUI
409409
CONFIGURATIONS RelWithDebInfo
410410
)
411411
endif()

CMakeLists.txt

Lines changed: 10 additions & 10 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)
@@ -78,7 +78,7 @@ else()
7878
set(NBL_PARALLEL_BUILD_JOBS 8)
7979
endif()
8080

81-
macro(irr_adjust_flags)
81+
macro(nbl_adjust_flags)
8282
option(NBL_GCC_SANITIZE_ADDRESS OFF)
8383
option(NBL_GCC_SANITIZE_THREAD OFF)
8484

@@ -155,11 +155,11 @@ macro(irr_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

162-
macro(irr_adjust_definitions)
162+
macro(nbl_adjust_definitions)
163163
add_definitions(
164164
-DPNG_THREAD_UNSAFE_OK
165165
-DPNG_NO_MMX_CODE
@@ -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/irr) # Irrlicht code | Moved cmakelists.txt from source/Irrlicht to src/irr
235+
add_subdirectory(src/nbl) # Nabla code | Moved cmakelists.txt from source/Nabla to src/nbl
236236

237237

238238

cmake/common.cmake

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ endfunction()
2828
# Macro creating project for an executable
2929
# Project and target get its name from directory when this macro gets executed (truncating number in the beginning of the name and making all lower case)
3030
# Created because of common cmake code for examples and tools
31-
macro(irr_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDES _EXTRA_LIBS)
31+
macro(nbl_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDES _EXTRA_LIBS)
3232
get_filename_component(EXECUTABLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
3333
string(REGEX REPLACE "^[0-9]+\." "" EXECUTABLE_NAME ${EXECUTABLE_NAME})
3434
string(TOLOWER ${EXECUTABLE_NAME} EXECUTABLE_NAME)
@@ -41,14 +41,14 @@ macro(irr_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(irr_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)
@@ -75,8 +75,8 @@ macro(irr_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDE
7575
endif()
7676

7777
# https://github.com/buildaworldnet/IrrlichtBAW/issues/298 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
78-
irr_adjust_flags() # macro defined in root CMakeLists
79-
irr_adjust_definitions() # macro defined in root CMakeLists
78+
nbl_adjust_flags() # macro defined in root CMakeLists
79+
nbl_adjust_definitions() # macro defined in root CMakeLists
8080

8181
set_target_properties(${EXECUTABLE_NAME} PROPERTIES DEBUG_POSTFIX _d)
8282
set_target_properties(${EXECUTABLE_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX _rwdi)
@@ -154,25 +154,25 @@ macro(irr_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDE
154154
endif()
155155
endmacro()
156156

157-
macro(irr_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUDES LIB_OPTIONS)
157+
macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUDES LIB_OPTIONS)
158158
set(LIB_NAME "IrrExt${EXT_NAME}")
159159
project(${LIB_NAME})
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}
166-
PUBLIC ${CMAKE_BINARY_DIR}/include/irr/config/debug
167-
PUBLIC ${CMAKE_BINARY_DIR}/include/irr/config/release
168-
PUBLIC ${CMAKE_BINARY_DIR}/include/irr/config/relwithdebinfo
166+
PUBLIC ${CMAKE_BINARY_DIR}/include/nbl/config/debug
167+
PUBLIC ${CMAKE_BINARY_DIR}/include/nbl/config/release
168+
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

@@ -187,8 +187,8 @@ macro(irr_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
187187
endif()
188188

189189
# https://github.com/buildaworldnet/IrrlichtBAW/issues/298 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
190-
irr_adjust_flags() # macro defined in root CMakeLists
191-
irr_adjust_definitions() # macro defined in root CMakeLists
190+
nbl_adjust_flags() # macro defined in root CMakeLists
191+
nbl_adjust_definitions() # macro defined in root CMakeLists
192192

193193
set_target_properties(${LIB_NAME} PROPERTIES DEBUG_POSTFIX _d)
194194
set_target_properties(${LIB_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX _rwdb)
@@ -208,60 +208,60 @@ macro(irr_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
208208

209209
install(
210210
FILES ${LIB_HEADERS}
211-
DESTINATION ./include/irr/ext/${EXT_NAME}
211+
DESTINATION ./include/nbl/ext/${EXT_NAME}
212212
CONFIGURATIONS Release
213213
)
214214
install(
215215
FILES ${LIB_HEADERS}
216-
DESTINATION ./debug/include/irr/ext/${EXT_NAME}
216+
DESTINATION ./debug/include/nbl/ext/${EXT_NAME}
217217
CONFIGURATIONS Debug
218218
)
219219
install(
220220
FILES ${LIB_HEADERS}
221-
DESTINATION ./relwithdebinfo/include/irr/ext/${EXT_NAME}
221+
DESTINATION ./relwithdebinfo/include/nbl/ext/${EXT_NAME}
222222
CONFIGURATIONS RelWithDebInfo
223223
)
224224
install(
225225
TARGETS ${LIB_NAME}
226-
DESTINATION ./lib/irr/ext/${EXT_NAME}
226+
DESTINATION ./lib/nbl/ext/${EXT_NAME}
227227
CONFIGURATIONS Release
228228
)
229229
install(
230230
TARGETS ${LIB_NAME}
231-
DESTINATION ./debug/lib/irr/ext/${EXT_NAME}
231+
DESTINATION ./debug/lib/nbl/ext/${EXT_NAME}
232232
CONFIGURATIONS Debug
233233
)
234234
install(
235235
TARGETS ${LIB_NAME}
236-
DESTINATION ./relwithdebinfo/lib/irr/ext/${EXT_NAME}
236+
DESTINATION ./relwithdebinfo/lib/nbl/ext/${EXT_NAME}
237237
CONFIGURATIONS RelWithDebInfo
238238
)
239239

240-
set("IRR_EXT_${EXT_NAME}_INCLUDE_DIRS"
241-
"${IRR_ROOT_PATH}/include/"
242-
"${IRR_ROOT_PATH}/src"
243-
"${IRR_ROOT_PATH}/source/Irrlicht"
244-
"${IRR_ROOT_PATH}/ext/${EXT_NAME}"
240+
set("NBL_EXT_${EXT_NAME}_INCLUDE_DIRS"
241+
"${NBL_ROOT_PATH}/include/"
242+
"${NBL_ROOT_PATH}/src"
243+
"${NBL_ROOT_PATH}/source/Nabla"
244+
"${NBL_ROOT_PATH}/ext/${EXT_NAME}"
245245
"${LIB_INCLUDES}"
246246
PARENT_SCOPE
247247
)
248-
set("IRR_EXT_${EXT_NAME}_LIB"
248+
set("NBL_EXT_${EXT_NAME}_LIB"
249249
"${LIB_NAME}"
250250
PARENT_SCOPE
251251
)
252252
endmacro()
253253

254254
# End of TODO, rest are all functions
255255

256-
function(irr_get_conf_dir _OUTVAR _CONFIG)
256+
function(nbl_get_conf_dir _OUTVAR _CONFIG)
257257
string(TOLOWER ${_CONFIG} CONFIG)
258-
set(${_OUTVAR} "${CMAKE_BINARY_DIR}/include/irr/config/${CONFIG}" PARENT_SCOPE)
258+
set(${_OUTVAR} "${CMAKE_BINARY_DIR}/include/nbl/config/${CONFIG}" PARENT_SCOPE)
259259
endfunction()
260260

261261

262262
# function for installing header files preserving directory structure
263263
# _DEST_DIR is directory relative to CMAKE_INSTALL_PREFIX
264-
function(irr_install_headers _HEADERS _BASE_HEADERS_DIR)
264+
function(nbl_install_headers _HEADERS _BASE_HEADERS_DIR)
265265
foreach (file ${_HEADERS})
266266
file(RELATIVE_PATH dir ${_BASE_HEADERS_DIR} ${file})
267267
get_filename_component(dir ${dir} DIRECTORY)
@@ -271,10 +271,10 @@ function(irr_install_headers _HEADERS _BASE_HEADERS_DIR)
271271
endforeach()
272272
endfunction()
273273

274-
function(irr_install_config_header _CONF_HDR_NAME)
275-
irr_get_conf_dir(dir_deb Debug)
276-
irr_get_conf_dir(dir_rel Release)
277-
irr_get_conf_dir(dir_relWithDebInfo RelWithDebInfo)
274+
function(nbl_install_config_header _CONF_HDR_NAME)
275+
nbl_get_conf_dir(dir_deb Debug)
276+
nbl_get_conf_dir(dir_rel Release)
277+
nbl_get_conf_dir(dir_relWithDebInfo RelWithDebInfo)
278278
set(file_deb "${dir_deb}/${_CONF_HDR_NAME}")
279279
set(file_rel "${dir_rel}/${_CONF_HDR_NAME}")
280280
set(file_relWithDebInfo "${dir_relWithDebInfo}/${_CONF_HDR_NAME}")

examples_tests/01.HelloWorld/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ if(NOT RES)
44
message(FATAL_ERROR "common.cmake not found. Should be in {repo_root}/cmake directory")
55
endif()
66

7-
irr_create_executable_project("" "" "" "")
7+
nbl_create_executable_project("" "" "" "")

0 commit comments

Comments
 (0)