@@ -37,25 +37,10 @@ macro(FindLibraryAndSONAME _LIB)
3737endmacro()
3838
3939FindLibraryAndSONAME(wayland-client)
40- FindLibraryAndSONAME(wayland-egl)
4140FindLibraryAndSONAME(wayland-cursor)
4241message(FATAL_ERROR "XDDDDDDD")
4342]]
4443
45- if (NOT ANDROID)
46- find_package (OpenGL REQUIRED OPTIONAL_COMPONENTS EGL)
47- else ()
48- # TODO: @AnastaZluk we have these in our own 3rdparty anyway!
49- find_path (GLES3_INCLUDE_DIR GLES3/gl31.h HINTS ${ANDROID_NDK_ROOT_PATH} REQUIRED)
50- if (${GLES3_INCLUDE_DIR} )
51- set (OpenGL_OpenGL_FOUND True )
52- endif ()
53- find_path (EGL_INCLUDE_DIR EGL/egl.h HINTS ${ANDROID_NDK_ROOT_PATH} REQUIRED)
54- if (${OPENGL_EGL_INCLUDE_DIRS} )
55- set (OpenGL_EGL_FOUND True )
56- set (OPENGL_EGL_INCLUDE_DIRS True )
57- endif ()
58- endif ()
5944if (UNIX AND NOT ANDROID)
6045 # TODO: maybe require the `-dev` packages for both? (or ship headers ourselves?)
6146 find_package (Wayland)
@@ -116,8 +101,8 @@ option(_NBL_COMPILE_WITH_PNG_LOADER_ "Compile with PNG Loader" ON)
116101option (_NBL_COMPILE_WITH_PNG_WRITER_ "Compile with PNG Writer" ON )
117102option (_NBL_COMPILE_WITH_TGA_LOADER_ "Compile with TGA Loader" ON )
118103option (_NBL_COMPILE_WITH_TGA_WRITER_ "Compile with TGA Writer" ON )
119- option (_NBL_COMPILE_WITH_OPENEXR_LOADER_ "Compile with OpenEXR Loader" OFF ) # TMP OFF COMPILE ERRORS ON V143 ON MASTER
120- option (_NBL_COMPILE_WITH_OPENEXR_WRITER_ "Compile with OpenEXR Writer" OFF ) # TMP OFF COMPILE ERRORS ON V143 ON MASTER
104+ option (_NBL_COMPILE_WITH_OPENEXR_LOADER_ "Compile with OpenEXR Loader" ON )
105+ option (_NBL_COMPILE_WITH_OPENEXR_WRITER_ "Compile with OpenEXR Writer" ON )
121106option (_NBL_COMPILE_WITH_GLI_LOADER_ "Compile with GLI Loader" ON )
122107option (_NBL_COMPILE_WITH_GLI_WRITER_ "Compile with GLI Writer" ON )
123108option (_NBL_COMPILE_WITH_GLTF_LOADER_ "Compile with GLTF Loader" OFF ) # TMP OFF COMPILE ERRORS ON V143 ON MASTER
@@ -138,7 +123,6 @@ if(NBL_EMBED_BUILTIN_RESOURCES)
138123endif ()
139124nbl_get_conf_dir(NABLA_CONF_DIR_RELWITHDEBINFO RelWithDebInfo)
140125
141- set (_NBL_COMPILE_WITH_OPENGL_ ${NBL_COMPILE_WITH_OPENGL} )
142126if (NBL_COMPILE_WITH_CUDA)
143127 message (STATUS "Building with CUDA interop" )
144128 set (_NBL_COMPILE_WITH_CUDA_ ${NBL_COMPILE_WITH_CUDA} )
@@ -152,7 +136,7 @@ set(_NBL_EMBED_BUILTIN_RESOURCES_ ${NBL_EMBED_BUILTIN_RESOURCES})
152136#set(_NBL_TARGET_ARCH_ARM_ ${NBL_TARGET_ARCH_ARM}) #uncomment in the future
153137
154138# TODO: this is a mess and not the right way to about it
155- if (WAYLAND_CLIENT_FOUND AND OpenGL_EGL_FOUND )
139+ if (WAYLAND_CLIENT_FOUND)
156140 set (_NBL_BUILD_WITH_WAYLAND 1)
157141 #message(FATAL_ERROR "found wayland! ${WAYLAND_CLIENT_LIBRARY}")
158142else ()
@@ -316,27 +300,6 @@ set(NBL_VIDEO_SOURCES
316300 ${NBL_ROOT_PATH} /src/nbl/video/IGPUFence.cpp
317301 ${NBL_ROOT_PATH} /src/nbl/video/IDeviceMemoryAllocation.cpp
318302 ${NBL_ROOT_PATH} /src/nbl/video/IDeviceMemoryBacked.cpp
319-
320- # OpenGL KILL IT
321- #${NBL_ROOT_PATH}/src/nbl/video/IOpenGL_FunctionTable.cpp
322- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLPipelineCache.cpp
323- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLImage.cpp
324- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLImageView.cpp
325- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLBuffer.cpp
326- ##${NBL_ROOT_PATH}/src/nbl/video/COpenGLBufferView.cpp
327- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLSpecializedShader.cpp
328- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLSampler.cpp
329- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLCommandBuffer.cpp
330- #${NBL_ROOT_PATH}/src/nbl/video/SOpenGLContextLocalCache.cpp
331- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLSync.cpp
332- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLShader.cpp
333- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLRenderpassIndependentPipeline.cpp
334- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLFramebuffer.cpp
335- #${NBL_ROOT_PATH}/src/nbl/video/COpenGL_Connection.cpp
336- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLComputePipeline.cpp
337- #${NBL_ROOT_PATH}/src/nbl/video/COpenGLQueryPool.cpp
338- #${NBL_ROOT_PATH}/src/nbl/video/COpenGL_Swapchain.cpp
339- #${NBL_ROOT_PATH}/src/nbl/video/debug/COpenGLDebugCallback.cpp
340303
341304# Vulkan
342305 ${NBL_ROOT_PATH} /src/nbl/video/CVulkanSwapchain.cpp
@@ -620,11 +583,6 @@ endif()
620583if (NBL_COMPILE_WITH_CUDA)
621584 target_include_directories (Nabla PUBLIC ${CUDAToolkit_INCLUDE_DIRS} )
622585endif ()
623- # OpenGL (EGL)
624- target_link_libraries (Nabla PRIVATE egl)
625- if (ANDROID)
626- target_compile_definitions (Nabla PUBLIC $<$<BOOL :${OpenGL_EGL_FOUND} >:WL_EGL_PLATFORM>)
627- endif ()
628586
629587# Include dirs for self
630588target_include_directories (Nabla PUBLIC
@@ -636,15 +594,14 @@ target_include_directories(Nabla PUBLIC
636594 "$<$<CONFIG:DEBUG>:${NABLA_CONF_DIR_DEBUG} >"
637595 "$<$<CONFIG:RELEASE>:${NABLA_CONF_DIR_RELEASE} >"
638596 "$<$<CONFIG:RELWITHDEBINFO>:${NABLA_CONF_DIR_RELWITHDEBINFO} >"
639- "$<$<BOOL:${OpenGL_EGL_FOUND} >:${OPENGL_EGL_INCLUDE_DIRS} >"
640597 "$<$<BOOL:${WAYLAND_CLIENT_FOUND} >:${WAYLAND_CLIENT_INCLUDE_DIR} >"
641598)
642599
643600target_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
644601target_include_directories (Nabla PRIVATE ${CMAKE_BINARY_DIR} /include )
645602
646603target_compile_definitions (Nabla
647- PRIVATE EGL_STATIC SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
604+ PRIVATE SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
648605 INTERFACE _NBL_PCH_IGNORE_PRIVATE_HEADERS
649606)
650607
@@ -708,7 +665,6 @@ nbl_install_lib(Nabla)
708665
709666if (NBL_STATIC_BUILD)
710667 # install dependencies, they are required only for static Nabla builds
711- nbl_install_lib(egl)
712668 nbl_install_lib(glslang)
713669 nbl_install_lib(GenericCodeGen)
714670 nbl_install_lib(MachineIndependent)
0 commit comments