fix w64-mingw32-ld linking error (#3184)
* fix w64-mingw32-ld linking error use shlwapi instead of Shlwapi.lib in mingw-w64 build environment (prevents "/usr/bin/x86_64-w64-mingw32-ld: cannot find -lShlwapi" error) * same MinGW shlwapi fix for {tests,tools}/CMakeLists.txt Co-authored-by: Igor Rondarev <igor.rondarev@gmail.com>
This commit is contained in:
parent
cddaa6d671
commit
77716ee398
|
@ -24,7 +24,11 @@ if (USE_Z3)
|
||||||
target_link_libraries(cppcheck ${Z3_LIBRARIES})
|
target_link_libraries(cppcheck ${Z3_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if (WIN32 AND NOT BORLAND)
|
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()
|
endif()
|
||||||
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||||
target_link_libraries(cppcheck tinyxml2)
|
target_link_libraries(cppcheck tinyxml2)
|
||||||
|
|
|
@ -20,7 +20,11 @@ if (BUILD_TESTS)
|
||||||
target_link_libraries(testrunner ${Z3_LIBRARIES})
|
target_link_libraries(testrunner ${Z3_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if (WIN32 AND NOT BORLAND)
|
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()
|
endif()
|
||||||
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||||
target_link_libraries(testrunner tinyxml2)
|
target_link_libraries(testrunner tinyxml2)
|
||||||
|
|
|
@ -18,7 +18,11 @@ add_executable(dmake EXCLUDE_FROM_ALL
|
||||||
)
|
)
|
||||||
target_include_directories(dmake PRIVATE ${CMAKE_SOURCE_DIR}/cli ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp)
|
target_include_directories(dmake PRIVATE ${CMAKE_SOURCE_DIR}/cli ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp)
|
||||||
if (WIN32 AND NOT BORLAND)
|
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()
|
endif()
|
||||||
|
|
||||||
add_custom_target(run-dmake $<TARGET_FILE:dmake>
|
add_custom_target(run-dmake $<TARGET_FILE:dmake>
|
||||||
|
|
Loading…
Reference in New Issue