]> granicus.if.org Git - taglib/commitdiff
Fixed shlwapi.h and shlwapi.lib detection for MSVC
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Sat, 25 May 2013 19:17:18 +0000 (04:17 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Sat, 25 May 2013 19:17:18 +0000 (04:17 +0900)
ConfigureChecks.cmake
taglib/CMakeLists.txt

index eda7a2b6f126b9f8fed1262f4aa5b24c1338301f..192c1441ccc2f8bc3fbb6857bd46fb16c53fd3ab 100755 (executable)
@@ -219,7 +219,7 @@ endif()
 
 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
 
-if(WIN32)
+if(WIN32 AND NOT MSVC)
   find_package(SHLWAPI)
   if(SHLWAPI_FOUND)
     set(HAVE_SHLWAPI 1)
index 03eb15b5a3ef84d204a320415399f1c36c8d6641..1753fa33df9992a5e4b3995a0d7acefb12e5cfb4 100755 (executable)
@@ -30,7 +30,7 @@ if(ZLIB_FOUND)
   include_directories(${ZLIB_INCLUDE_DIR})
 endif()
 
-if(SHLWAPI_FOUND)
+if(NOT MSVC AND SHLWAPI_FOUND)
   include_directories(${SHLWAPI_INCLUDE_DIR})
 endif()
 
@@ -315,8 +315,12 @@ if(ZLIB_FOUND)
        target_link_libraries(tag ${ZLIB_LIBRARIES})
 endif()
 
-if(SHLWAPI_FOUND)
-  target_link_libraries(tag ${SHLWAPI_LIBRARIES})
+if(MSVC)
+  target_link_libraries(tag shlwapi.lib)
+else()
+  if(SHLWAPI_FOUND)
+    target_link_libraries(tag ${SHLWAPI_LIBRARIES})
+  endif()
 endif()
 
 set_target_properties(tag PROPERTIES