diff --git a/UI/frontend-plugins/frontend-tools/CMakeLists.txt b/UI/frontend-plugins/frontend-tools/CMakeLists.txt index 3ce774de3..bc0cae122 100644 --- a/UI/frontend-plugins/frontend-tools/CMakeLists.txt +++ b/UI/frontend-plugins/frontend-tools/CMakeLists.txt @@ -5,7 +5,7 @@ if(APPLE) include_directories(${COCOA}) endif() -if(UNIX) +if(LINUX) find_package(X11 REQUIRED) link_libraries(${X11_LIBRARIES}) include_directories(${X11_INCLUDE_DIR}) diff --git a/deps/glad/CMakeLists.txt b/deps/glad/CMakeLists.txt index 0fe6a937b..90e35fb2e 100644 --- a/deps/glad/CMakeLists.txt +++ b/deps/glad/CMakeLists.txt @@ -20,6 +20,14 @@ elseif(NOT APPLE) include/glad/glad_glx.h) endif() +set(glad_include_dirs + PRIVATE ${OPENGL_INCLUDE_DIR}) + +if (LINUX) +list (APPEND glad_include_dirs + PRIVATE ${X11_X11_INCLUDE_PATH}) +endif() + add_library(glad SHARED ${glad_SOURCES} ${glad_PLATFORM_SOURCES}) @@ -29,7 +37,7 @@ set_target_properties(glad PROPERTIES SOVERSION "0") target_include_directories(glad PUBLIC include - PRIVATE ${X11_X11_INCLUDE_PATH} ${OPENGL_INCLUDE_DIR}) + ${glad_include_dirs}) target_compile_definitions(glad PRIVATE GLAD_GLAPI_EXPORT_BUILD)