Skip to content

Commit

Permalink
Merge pull request #4 from Kataglyphis:develop
Browse files Browse the repository at this point in the history
pumping up imgui dep
  • Loading branch information
Kataglyphis authored Nov 11, 2024
2 parents 8ad92d8 + 587fe6b commit 3320025
Show file tree
Hide file tree
Showing 225 changed files with 698,043 additions and 339 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ jobs:
iwyu
- name: Install for Offscreen Rendering on GLFW
run: sudo apt-get install libosmesa6-dev
- name: Prepare python env for sphynx
run: |
pip install sphinx
pip install sphinx-press-theme
pip install myst-parser
- name: Create docs
run: |
cd docs
make html
- name: Install Vulkan
run: |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
Expand Down Expand Up @@ -76,7 +85,7 @@ jobs:
working-directory: ${{github.workspace}}/build/
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}} --verbose --extra-verbose --debug -T test --output-on-failure -E SetUp.blob
run: ctest -C ${{env.BUILD_TYPE}} --verbose --extra-verbose --debug -T test --output-on-failure -E SetUp.blob RendererTest.DISABLED_BasicSetup
- name: Build Code Coverage
run: |
llvm-profdata merge -sparse ${{github.workspace}}/build/Test/compile/default.profraw -o ${{github.workspace}}/build/compileTestSuite.profdata
Expand All @@ -91,3 +100,12 @@ jobs:
name: codecov-umbrella # optional
fail_ci_if_error: false # optional (default = false)
verbose: false # optional (default = false)

- name: 📂 Sync files to dev domain
if: github.ref == 'refs/heads/dev'
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.SERVER }}
username: ${{ secrets.DEV_USERNAME }}
password: ${{ secrets.DEV_PW }}
local-dir: "./docs/build/html"
18 changes: 13 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ myproject_global_options()
myproject_local_options()

include(cmake/SystemLibDependencies.cmake)
include(cmake/filters/SetExternalLibsFilters.cmake)
include(Src/GraphicsEngineVulkan/cmake/filters/SetExternalLibsFilters.cmake)
add_subdirectory(ExternalLib)

add_subdirectory(Src)
Expand Down Expand Up @@ -58,10 +58,17 @@ else()
message(STATUS "WINDOWS_CI is OFF or not defined.")
endif()

add_subdirectory(Test/commit)
add_subdirectory(Test/compile)
add_subdirectory(Test/perf)
add_subdirectory(Test/fuzz)
include(CTest)

if(BUILD_TESTING)
message(STATUS "Tests are enabled.!")
add_subdirectory(Test/commit)
add_subdirectory(Test/compile)
add_subdirectory(Test/perf)
add_subdirectory(Test/fuzz)
else()
message(STATUS "Tests are disabled.!")
endif()

# for correct library output needed
install(
Expand All @@ -77,6 +84,7 @@ install(DIRECTORY ExternalLib/IMGUI/misc/fonts/ DESTINATION ExternalLib/IMGUI/mi
# we are using this dir strings for removing hard coded file locations
# at c++ side
configure_file(VulkanRendererConfig.hpp.in "${CMAKE_CURRENT_SOURCE_DIR}/include/renderer/VulkanRendererConfig.hpp")
configure_file(OpenGLRendererConfig.hpp.in "${CMAKE_CURRENT_SOURCE_DIR}/Src/GraphicsEngineOpenGL/renderer/OpenGLRendererConfig.hpp")

include(InstallRequiredSystemLibraries)

Expand Down
39 changes: 38 additions & 1 deletion ExternalLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@ FetchContent_Declare(
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

# We will not need to test benchmark lib itself.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable benchmark testing as we don't need it.")
# We will not need to test benchmark lib itself.
set(BENCHMARK_INSTALL_DOCS OFF CACHE BOOL "Disable benchmark testing as we don't need it.")
# We will not need to install benchmark since we link it statically.
set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Disable benchmark install to avoid overwriting vendor install.")
set(BENCHMARK_USE_BUNDLED_GTEST OFF CACHE BOOL "Disable the bundled GTest usage.")

add_subdirectory(GOOGLE_BENCHMARK)

# hotfix for issue:
# https://github.com/google/benchmark/pull/1875
target_compile_options(benchmark INTERFACE -Wno-c++17-attribute-extensions)
target_compile_options(benchmark_main INTERFACE -Wno-c++17-attribute-extensions)


if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
message(STATUS "This is a Linux system.")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
Expand Down Expand Up @@ -83,6 +92,11 @@ add_subdirectory(SPDLOG)

add_subdirectory(NLOHMANN_JSON)

add_library(glad INTERFACE)
target_include_directories(glad SYSTEM
INTERFACE
GLAD/include)

# https://stackoverflow.com/questions/49591804/clang-tidy-cmake-exclude-file-from-check/49591908#49591908
# with this trick IMGUI will be excluded from time consuming static code analysis
# we do not want to analyze imgui ...
Expand All @@ -97,16 +111,39 @@ add_library(
target_link_libraries(IMGUI PRIVATE
${CMAKE_DL_LIBS}
Vulkan::Vulkan
${OPENGL_LIBRARIES}
glfw
imgui

)

target_include_directories(IMGUI PRIVATE ${Vulkan_INCLUDE_DIRS})
target_include_directories(IMGUI PRIVATE ${Vulkan_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIRS})

set_target_properties(
IMGUI
PROPERTIES
CXX_CLANG_TIDY ""
CXX_CPPCHECK ""
)

# GLAD LIB
add_library(
GLAD
OBJECT
${GLAD_FILTER}
)

target_link_libraries(GLAD PRIVATE ${OPENGL_LIBRARIES}

)

target_include_directories(GLAD PRIVATE GLAD/include
${OPENGL_INCLUDE_DIRS})

set_target_properties(
GLAD
PROPERTIES
CXX_CLANG_TIDY ""
CXX_CPPCHECK ""
)
Loading

0 comments on commit 3320025

Please sign in to comment.