summary refs log tree commit diff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-02-19 13:12:57 +0100
committerMel <einebeere@gmail.com>2024-02-19 13:12:57 +0100
commit3ae3891ca2698d5fd2160fbed5b780a91651a218 (patch)
treeebfd259ed517a1ddc9a26c469b7c34fc165d5ced /CMakeLists.txt
parent3e6eb265a018fd0422b59ca9ea1b8918abee5c16 (diff)
downloadmeowcraft-3ae3891ca2698d5fd2160fbed5b780a91651a218.tar.zst
meowcraft-3ae3891ca2698d5fd2160fbed5b780a91651a218.zip
Fix for GCC and Linux
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5117ea3..a4cf912 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 # Enable assertions for RelWithDebInfo builds.
 string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
 
-set(GLEW_USE_STATIC_LIBS ON)
+if (NOT UNIX)
+    set(GLEW_USE_STATIC_LIBS ON)
+endif (NOT UNIX)
 
 find_package(glfw3 3.3 REQUIRED)
 find_package(GLEW REQUIRED)
@@ -93,7 +95,7 @@ if (WIN32)
     set(LINK_FLAGS "-static-libgcc -static-libstdc++ -static -mwindows")
 endif (WIN32)
 
-target_link_libraries(meowcraft PRIVATE glfw GLEW::glew_s OpenGL::GL ${LINK_FLAGS})
+target_link_libraries(meowcraft PRIVATE glfw GLEW::GLEW OpenGL::GL ${LINK_FLAGS})
 
 function(make_includable input_file output_file)
     file(READ ${input_file} content)