aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorladevieq <qladevie@wanadev.fr>2021-03-05 13:36:58 +0100
committerladevieq <qladevie@wanadev.fr>2021-03-05 13:36:58 +0100
commit7887cb560a4efd80f9124d32ec177913c80259a1 (patch)
tree0950d40af93071634224dc2423b09a8c6fa9cba9 /src/CMakeLists.txt
parent2218ad410c01c8e3ea8416dd019d0c3072fbb1cf (diff)
Fix linux build
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 04dc37e..5380cde 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,6 +7,8 @@ if(UNIX)
include_directories(${X11_xcb_INCLUDE_PATH})
endif()
+set(LIBRARIES imgui::imgui)
+
add_executable(
path-tracer
main.cpp
@@ -22,10 +24,8 @@ add_executable(
window.cpp
)
-target_link_libraries(path-tracer PRIVATE imgui::imgui)
-
if(UNIX)
- target_link_libraries(path-tracer ${CMAKE_DL_LIBS} ${X11_xcb_LIB})
- target_link_libraries(path-tracer ${CMAKE_DL_LIBS} ${X11_xkbcommon_LIB})
- target_link_libraries(path-tracer ${CMAKE_DL_LIBS} ${X11_xkbcommon_X11_LIB})
+ list(APPEND LIBRARIES ${CMAKE_DL_LIBS} ${X11_xcb_LIB} ${X11_xkbcommon_LIB} ${X11_xkbcommon_X11_LIB})
endif()
+
+target_link_libraries(path-tracer PRIVATE ${LIBRARIES})