diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5860e35..d408a0e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,6 +2,12 @@ cmake_minimum_required(VERSION 3.13) project(System3 LANGUAGES CXX) +# In msys, `pkg-config --libs` returns `-lmingw32` but find_library() cannot +# find it in default search paths. +if (MSYS) + list(APPEND CMAKE_LIBRARY_PATH $ENV{MINGW_PREFIX}/$ENV{MINGW_CHOST}/lib) +endif () + set(SRC_COMMON sdlmain.cpp fileio.cpp