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)