Skip to content

Commit cbad935

Browse files
Merge pull request #334 from Devsh-Graphics-Programming/BuildSystemFix
Build system fix
2 parents 901effb + 27e88f8 commit cbad935

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

cmake/common.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ macro(nbl_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDE
4747

4848
# 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)
4949
add_dependencies(${EXECUTABLE_NAME} Nabla)
50-
50+
get_target_property(NBL_EGL_INCLUDE_DIRECORIES egl INCLUDE_DIRECTORIES)
51+
5152
target_include_directories(${EXECUTABLE_NAME}
5253
PUBLIC ../../include
5354
PRIVATE ${_EXTRA_INCLUDES}
55+
PRIVATE ${NBL_EGL_INCLUDE_DIRECORIES}
5456
)
55-
target_link_libraries(${EXECUTABLE_NAME} Nabla ${_EXTRA_LIBS}) # see, this is how you should code to resolve github issue 311
57+
target_link_libraries(${EXECUTABLE_NAME} PUBLIC Nabla ${_EXTRA_LIBS}) # see, this is how you should code to resolve github issue 311
5658

5759
add_compile_options(${_EXTRA_OPTIONS})
5860

@@ -181,6 +183,7 @@ macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
181183
add_dependencies(${LIB_NAME} Nabla)
182184

183185
get_target_property(_NBL_NABLA_TARGET_BINARY_DIR_ Nabla BINARY_DIR)
186+
get_target_property(NBL_EGL_INCLUDE_DIRECORIES egl INCLUDE_DIRECTORIES)
184187

185188
target_include_directories(${LIB_NAME}
186189
PUBLIC ${_NBL_NABLA_TARGET_BINARY_DIR_}/build/import
@@ -191,6 +194,7 @@ macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
191194
PUBLIC ${CMAKE_SOURCE_DIR}/src
192195
PUBLIC ${CMAKE_SOURCE_DIR}/source/Nabla
193196
PRIVATE ${LIB_INCLUDES}
197+
PRIVATE ${NBL_EGL_INCLUDE_DIRECORIES}
194198
)
195199
add_dependencies(${LIB_NAME} Nabla)
196200
target_link_libraries(${LIB_NAME} PUBLIC Nabla)

include/nbl/video/COpenGLSync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class COpenGLSync final : public core::IReferenceCounted
5757
// Already signalled constructor (for IGPUFence)
5858
struct signalled_t {};
5959
constexpr static inline signalled_t signalled = {};
60-
inline COpenGLSync(core::smart_refctd_ptr<IOpenGL_LogicalDevice>&& _dev, IOpenGL_FunctionTable* _gl, signalled_t signalled);
60+
COpenGLSync(core::smart_refctd_ptr<IOpenGL_LogicalDevice>&& _dev, IOpenGL_FunctionTable* _gl, signalled_t signalled);
6161

6262
private:
6363
core::smart_refctd_ptr<IOpenGL_LogicalDevice> device;

src/nbl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ target_include_directories(Nabla PUBLIC
582582
"$<$<BOOL:${OpenGL_EGL_FOUND}>:${OPENGL_EGL_INCLUDE_DIRS}>"
583583
"$<$<BOOL:${WAYLAND_CLIENT_FOUND}>:${WAYLAND_CLIENT_INCLUDE_DIR}>"
584584
)
585+
585586
target_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
586587
target_include_directories(Nabla PRIVATE ${CMAKE_BINARY_DIR}/include)
587588
if (UNIX AND NOT ANDROID AND NOT APPLE)

0 commit comments

Comments
 (0)