diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index d8d21aa90..49b44316c 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -24,7 +24,11 @@ if (USE_Z3) target_link_libraries(cppcheck ${Z3_LIBRARIES}) endif() if (WIN32 AND NOT BORLAND) - target_link_libraries(cppcheck Shlwapi.lib) + if(NOT MINGW) + target_link_libraries(cppcheck Shlwapi.lib) + else() + target_link_libraries(cppcheck shlwapi) + endif() endif() if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) target_link_libraries(cppcheck tinyxml2) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 88f3a9291..6b8f2aff6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,7 +20,11 @@ if (BUILD_TESTS) target_link_libraries(testrunner ${Z3_LIBRARIES}) endif() if (WIN32 AND NOT BORLAND) - target_link_libraries(testrunner Shlwapi.lib) + if(NOT MINGW) + target_link_libraries(testrunner Shlwapi.lib) + else() + target_link_libraries(testrunner shlwapi) + endif() endif() if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) target_link_libraries(testrunner tinyxml2) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 303b8d55f..4176b897f 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -18,9 +18,13 @@ add_executable(dmake EXCLUDE_FROM_ALL ) target_include_directories(dmake PRIVATE ${CMAKE_SOURCE_DIR}/cli ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp) if (WIN32 AND NOT BORLAND) - target_link_libraries(dmake Shlwapi.lib) + if(NOT MINGW) + target_link_libraries(dmake Shlwapi.lib) + else() + target_link_libraries(dmake shlwapi) + endif() endif() add_custom_target(run-dmake $ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - DEPENDS dmake) \ No newline at end of file + DEPENDS dmake)