Skip to content

Commit 86f6c38

Browse files
committed
[FIX] : fix glfw waylang compilations issues on linux
1 parent 5477eb1 commit 86f6c38

File tree

6 files changed

+26
-3
lines changed

6 files changed

+26
-3
lines changed

.github/workflows/Leak.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ jobs:
2323
- name: checkout submodules
2424
run : git submodule update --init --recursive
2525
- name: Install OpenGL lib / Requirement for Glfw3
26-
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y \
29+
libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev \
30+
libxinerama-dev libxcursor-dev libwayland-dev
2731
- name: configure
2832
run: >
2933
mkdir build && cd build && cmake ..

.github/workflows/Linux_Clang.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ jobs:
2323
- name: checkout submodules
2424
run : git submodule update --init --recursive
2525
- name: Install OpenGL lib / Requirement for Glfw3
26-
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y \
29+
libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev \
30+
libxinerama-dev libxcursor-dev libwayland-dev
2731
- name: configure
2832
run: >
2933
mkdir build && cd build && cmake ..

.github/workflows/Linux_Gcc.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ jobs:
2323
- name: checkout submodules
2424
run : git submodule update --init --recursive
2525
- name: Install OpenGL lib / Requirement for Glfw3
26-
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y \
29+
libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev \
30+
libxinerama-dev libxcursor-dev libwayland-dev
2731
- name: configure
2832
run: >
2933
mkdir build && cd build && cmake ..

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ else()
144144
add_executable(${PROJECT} MACOSX_BUNDLE ${SOURCES})
145145
endif()
146146

147+
if (LINUX)
148+
target_link_libraries(${PROJECT} PRIVATE X11)
149+
endif()
150+
147151
target_compile_definitions(ImGuiFileDialog PRIVATE -DCUSTOM_IMGUIFILEDIALOG_CONFIG="${CMAKE_CURRENT_SOURCE_DIR}/src/headers/CustomImGuiFileDialogConfig.h")
148152
target_compile_definitions(${PROJECT} PRIVATE -DCUSTOM_IMGUIFILEDIALOG_CONFIG="${CMAKE_CURRENT_SOURCE_DIR}/src/headers/CustomImGuiFileDialogConfig.h")
149153

mainWinLinuxMacos.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ int main(int, char**) {
169169
// GPU Zone : Rendering
170170
glfwMakeContextCurrent(window);
171171

172+
// manage thumbnails
172173
demoDialog.manageGPU();
173174

174175
glViewport(0, 0, display_w, display_h);

visualTests/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,16 @@ add_executable(${PROJECT}
4141
${IMGUI_TEST_ENGINE_APP_SOURCES}
4242
)
4343

44+
set(EXTRA_LIBS)
45+
if (LINUX)
46+
set(EXTRA_LIBS ${EXTRA_LIBS} X11)
47+
endif()
48+
4449
target_link_libraries(${PROJECT}
4550
${GLAD_LIBRARIES}
4651
${GLFW_LIBRARIES}
4752
${OPENGL_LIBRARIES}
53+
${EXTRA_LIBS}
4854
)
4955

5056
target_include_directories(${PROJECT} PRIVATE

0 commit comments

Comments
 (0)