Commit 584e337f authored by Rex Dieter's avatar Rex Dieter
Browse files

Improve MusicBrainz3 buildsys support

- include directory is not used
- add pkgconfig hints

BUG: 320808
REVIEW: 110852
parent fa74437b
......@@ -16,7 +16,8 @@ find_package(MusicBrainz3 REQUIRED)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${MUSICBRAINZ3_INCLUDE_DIR}
)
add_subdirectory(tests)
########### next target ###############
......
......@@ -14,9 +14,22 @@ if(MUSICBRAINZ3_INCLUDE_DIR AND MUSICBRAINZ3_LIBRARIES)
set(MUSICBRAINZ3_FIND_QUIETLY TRUE)
endif(MUSICBRAINZ3_INCLUDE_DIR AND MUSICBRAINZ3_LIBRARIES)
FIND_PATH(MUSICBRAINZ3_INCLUDE_DIR musicbrainz3/musicbrainz.h)
FIND_LIBRARY( MUSICBRAINZ3_LIBRARIES NAMES musicbrainz3)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PC_LIBMUSICBRAINZ3 QUIET libmusicbrainz3)
FIND_PATH(MUSICBRAINZ3_INCLUDE_DIR musicbrainz3/musicbrainz.h
HINTS
${PC_LIBMUSICBRAINZ3_INCLUDEDIR}
${PC_LIBMUSICBRAINZ3_INCLUDE_DIRS}
)
FIND_LIBRARY( MUSICBRAINZ3_LIBRARIES NAMES musicbrainz3
HINTS
${PC_LIBMUSICBRAINZ3_LIBDIR}
${PC_LIBMUSICBRAINZ3_LIB_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( MusicBrainz3 DEFAULT_MSG
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment