Skip to content

Commit c11bafd

Browse files
add GLSL files (and other builtins) to Visual Studio Nabla project so that they're searchable
1 parent 1d96d78 commit c11bafd

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

src/nbl/CMakeLists.txt

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,6 @@ endforeach()
190190

191191
unset(NABLA_HEADERS_PUBLIC2 ${NBL_TMP_FULL_PATHS})
192192

193-
file(GLOB_RECURSE NABLA_HEADERS_PRIV1 "*.h")
194-
file(GLOB_RECURSE NABLA_HEADERS_PRIV2 "${NBL_ROOT_PATH}/src/nbl/*.h")
195-
# just gather all the header files and later put them into project so it's easy to search for things using IDE
196-
set(NABLA_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/include/nabla.h" ${NABLA_HEADERS_PUBLIC} ${NABLA_HEADERS_PIRV1} ${NABLA_HEADERS_PRIV2})
197-
198193

199194
#
200195
set(NBL_CORE_SOURCES
@@ -513,9 +508,21 @@ macro(nbl_target_link_simdjson _trgt)
513508
set_target_properties(simdjson PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
514509
endmacro()
515510

511+
# just gather all the header files and later put them into project so it's easy to search for things using IDE
512+
file(GLOB_RECURSE NABLA_HEADERS_PRIV1 "*.h")
513+
file(GLOB_RECURSE NABLA_HEADERS_PRIV2 "${NBL_ROOT_PATH}/src/nbl/*.h")
514+
set(NABLA_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/include/nabla.h" ${NABLA_HEADERS_PUBLIC} ${NABLA_HEADERS_PIRV1} ${NABLA_HEADERS_PRIV2})
515+
516+
#always install builtins (some may be included in cpp regardless if embedded or not)
517+
foreach(X IN LISTS nbl_resources_to_embed)
518+
list(APPEND NABLA_HEADERS_PUBLIC ${NBL_ROOT_PATH}/include/${X})
519+
endforeach()
520+
521+
# declare the library!
516522
add_library(Nabla STATIC
517523
${NABLA_SRCS_COMMON}
518524
${NABLA_HEADERS}
525+
${nbl_resources_to_embed}
519526
$<TARGET_OBJECTS:aesGladman>
520527
$<TARGET_OBJECTS:bzip2>
521528
$<TARGET_OBJECTS:lz4>
@@ -644,37 +651,18 @@ if(NBL_PCH)
644651
endif()
645652

646653
if(NBL_EMBED_BUILTIN_RESOURCES)
647-
add_custom_target(builtin_resources
648-
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/builtin/builtinResourceData.cpp)
649-
add_dependencies(Nabla builtin_resources)
654+
add_custom_target(builtin_resources DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/builtin/builtinResourceData.cpp)
655+
add_dependencies(Nabla builtin_resources)
650656
endif()
651657

652-
#always install builtins (some may be included in cpp regardless if embedded or not)
653-
foreach(X IN LISTS nbl_resources_to_embed)
654-
list(APPEND NABLA_HEADERS_PUBLIC ${NBL_ROOT_PATH}/include/${X})
655-
endforeach()
656-
657658

658659
# extensions
659660
start_tracking_variables_for_propagation_to_parent()
660661
add_subdirectory(ext)
661662
propagate_changed_variables_to_parent_scope()
662663

663-
set(NABLA_HEADERS_TO_INSTALL
664-
${NABLA_HEADERS_PUBLIC}
665-
)
666-
667-
set(NABLA_HEADERS_TO_INSTALL_SOURCE_REFACTOR
668-
# Junk to refactor
669-
${NBL_ROOT_PATH}/source/Nabla/CMountPointReader.h
670-
${NBL_ROOT_PATH}/source/Nabla/CPakReader.h
671-
${NBL_ROOT_PATH}/source/Nabla/CTarReader.h
672-
${NBL_ROOT_PATH}/source/Nabla/CZipReader.h
673-
)
674-
675664
nbl_install_headers("${CMAKE_CURRENT_BINARY_DIR}/include/nabla.h" "${CMAKE_CURRENT_BINARY_DIR}/include")
676-
nbl_install_headers("${NABLA_HEADERS_TO_INSTALL}" "${NBL_ROOT_PATH}/include")
677-
nbl_install_headers("${NABLA_HEADERS_TO_INSTALL_SOURCE_REFACTOR}" "${NBL_ROOT_PATH}/source/Nabla")
665+
nbl_install_headers("${NABLA_HEADERS_PUBLIC}" "${NBL_ROOT_PATH}/include")
678666
nbl_install_config_header(BuildConfigOptions.h)
679667

680668
macro(nbl_install_program _TRGT)

0 commit comments

Comments
 (0)