From 353dd0770484e647fc71b766ff6bfea8f690754d Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Fri, 15 Jan 2021 14:20:25 -0600 Subject: [PATCH] For the moment, builds on windows and linux --- .gitignore | 3 ++- CMakeLists.txt | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fb4dafb..dc28286 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.o build/ -build-win/ \ No newline at end of file +build-win/ +binaries/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 84e427a..3d810fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,9 @@ file(GLOB shaders shaders/*) add_compile_definitions(LUA_SCRIPTING) add_executable(couch ${sources}) include_directories(core) -target_link_libraries(couch glfw) +if(NOT WIN32) + target_link_libraries(couch glfw) +endif() target_link_libraries(couch OpenGL::GL) target_link_libraries(couch GLEW::GLEW) target_link_libraries(couch ${LUA_LIBRARIES}) @@ -35,4 +37,7 @@ swig_add_library(couchlua target_link_libraries(couchlua ${LUA_LIBRARIES}) target_link_libraries(couch couchlua) - +if(WIN32) + target_link_libraries(couch glfw3dll) + set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++") +endif(WIN32)