diff --git a/CMakeLists.txt b/CMakeLists.txt index a591527..39812c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,11 +32,11 @@ else() set(CMAKE_C_FLAGS "-O2 -Wno-discarded-qualifiers -Wno-pointer-arith -Wno-unused-variable -Wno-unused-parameter -Wall -Wextra -pedantic") endif() -target_link_libraries(${PROJECT_NAME} m GL SDL2::SDL2 SDL2_mixer::SDL2_mixer SDL2_ttf::SDL2_ttf SDL2_image::SDL2_image GLEW::GLEW) +target_link_libraries(${PROJECT_NAME} m SDL2::SDL2 SDL2_mixer::SDL2_mixer SDL2_ttf::SDL2_ttf SDL2_image::SDL2_image GLEW::GLEW) if (WIN32) set(CMAKE_C_FLAGS "-mwindows ${CMAKE_C_FLAGS}") - target_link_libraries(${PROJECT_NAME} mingw32 m GL SDL2::SDL2 SDL2_mixer::SDL2_mixer SDL2_ttf::SDL2_ttf SDL2_image::SDL2_image GLEW::GLEW) + target_link_libraries(${PROJECT_NAME} mingw32 m SDL2::SDL2 SDL2_mixer::SDL2_mixer SDL2_ttf::SDL2_ttf SDL2_image::SDL2_image GLEW::GLEW) endif() message("System: ${CMAKE_SYSTEM_NAME}") diff --git a/src/engine/glew.h b/src/engine/glew.h index b529fc0..872d60c 100644 --- a/src/engine/glew.h +++ b/src/engine/glew.h @@ -5,6 +5,10 @@ #pragma once +#ifdef _WIN32 +#define GLEW_STATIC +#endif + #include void glew_init(void); diff --git a/src/engine/sdl.h b/src/engine/sdl.h index 500fc0d..91a3c6c 100644 --- a/src/engine/sdl.h +++ b/src/engine/sdl.h @@ -5,6 +5,8 @@ #pragma once +#define SDL_MAIN_HANDLED + #include #include #include