Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【igl nanovg part-2】Core Implementation #217

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ option(IGL_WITH_OPENXR "Enable OpenXR" OFF)
option(IGL_ENFORCE_LOGS "Enable logs in Release builds" ON)

option(IGL_DEPLOY_DEPS "Deploy dependencies via CMake" ON)
option(IGLU_WITH_NANOVG "Enable IGLU Nanovg" OFF)

# cmake-format: on

if(DEFINED ENV{VULKAN_SDK})
Expand Down Expand Up @@ -97,6 +99,7 @@ message(STATUS "IGL_WITH_OPENXR = ${IGL_WITH_OPENXR}")
message(STATUS "IGL_ENFORCE_LOGS = ${IGL_ENFORCE_LOGS}")

message(STATUS "IGL_DEPLOY_DEPS = ${IGL_DEPLOY_DEPS}")
message(STATUS "IGLU_WITH_NANOVG = ${IGLU_WITH_NANOVG}")
# cmake-format: on

if(APPLE)
Expand Down
11 changes: 11 additions & 0 deletions IGLU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ macro(ADD_IGLU_MODULE module)
target_include_directories(IGLU${module} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/include")
target_include_directories(IGLU${module} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/include_${module}")
target_include_directories(IGLU${module} PUBLIC "${IGL_ROOT_DIR}")
if (IGLU_WITH_NANOVG)
target_include_directories(IGLU${module} PUBLIC "${IGL_ROOT_DIR}/third-party/deps/src/nanovg/src")
endif()
endmacro()

add_iglu_module(imgui)
Expand All @@ -36,6 +39,9 @@ add_iglu_module(shaderCross)
add_iglu_module(texture_accessor)
add_iglu_module(texture_loader)
add_iglu_module(uniform)
if (IGLU_WITH_NANOVG)
add_iglu_module(nanovg)
endif()

# header-only
add_library(IGLUsimdtypes INTERFACE)
Expand All @@ -59,6 +65,11 @@ target_sources(IGLUimgui PRIVATE "${IGL_ROOT_DIR}/third-party/deps/src/imgui/img
target_include_directories(IGLUimgui PUBLIC "${IGL_ROOT_DIR}/third-party/deps/src/imgui")
target_include_directories(IGLUtexture_accessor PUBLIC "${IGL_ROOT_DIR}/third-party/deps/src/glew/include")

# Nanovg
if (IGLU_WITH_NANOVG)
target_sources(IGLUnanovg PRIVATE "${IGL_ROOT_DIR}/third-party/deps/src/nanovg/src/nanovg.c")
endif()

if(UNIX)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(IGLUimgui PUBLIC "-Wno-volatile")
Expand Down
Loading
Loading