mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Merge pull request #220 from FestusHagen/cmake_shlwapi
Added FindShlwapi.cmake in lieu of pragma comment() in fileref.h.
This commit is contained in:
commit
e7c0f3322d
10
ConfigureChecks.cmake
Normal file → Executable file
10
ConfigureChecks.cmake
Normal file → Executable file
@ -218,6 +218,16 @@ endif()
|
||||
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
||||
|
||||
if(WIN32)
|
||||
find_package(SHLWAPI)
|
||||
if(SHLWAPI_FOUND)
|
||||
set(HAVE_SHLWAPI 1)
|
||||
else()
|
||||
set(HAVE_SHLWAPI 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(CppUnit)
|
||||
if(NOT CppUnit_FOUND AND BUILD_TESTS)
|
||||
message(STATUS "CppUnit not found, disabling tests.")
|
||||
|
14
cmake/modules/FindShlwapi.cmake
Executable file
14
cmake/modules/FindShlwapi.cmake
Executable file
@ -0,0 +1,14 @@
|
||||
# *
|
||||
# * It is what it is, you can do with it as you please.
|
||||
# *
|
||||
# * Just don't blame me if it teaches your computer to smoke!
|
||||
# *
|
||||
# * -Enjoy
|
||||
# * fh :)_~
|
||||
# *
|
||||
FIND_PATH(SHLWAPI_INCLUDE_DIR shlwapi.h)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SHLWAPI REQUIRED_VARS SHLWAPI_LIBRARY SHLWAPI_INCLUDE_DIR)
|
||||
IF(SHLWAPI_FOUND)
|
||||
SET(SHLWAPI_LIBRARIES ${SHLWAPI_LIBRARY} )
|
||||
ENDIF(SHLWAPI_FOUND)
|
||||
|
8
taglib/CMakeLists.txt
Normal file → Executable file
8
taglib/CMakeLists.txt
Normal file → Executable file
@ -30,6 +30,10 @@ if(ZLIB_FOUND)
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(SHLWAPI_FOUND)
|
||||
include_directories(${SHLWAPI_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
set(tag_HDRS
|
||||
tag.h
|
||||
fileref.h
|
||||
@ -311,6 +315,10 @@ if(ZLIB_FOUND)
|
||||
target_link_libraries(tag ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(SHLWAPI_FOUND)
|
||||
target_link_libraries(tag ${SHLWAPI_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set_target_properties(tag PROPERTIES
|
||||
VERSION ${TAGLIB_SOVERSION_MAJOR}.${TAGLIB_SOVERSION_MINOR}.${TAGLIB_SOVERSION_PATCH}
|
||||
SOVERSION ${TAGLIB_SOVERSION_MAJOR}
|
||||
|
4
taglib/fileref.h
Normal file → Executable file
4
taglib/fileref.h
Normal file → Executable file
@ -32,10 +32,6 @@
|
||||
#include "taglib_export.h"
|
||||
#include "audioproperties.h"
|
||||
|
||||
#if _WIN32
|
||||
# pragma comment(lib, "shlwapi.lib")
|
||||
#endif
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
class Tag;
|
||||
|
Loading…
Reference in New Issue
Block a user