Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 34 additions & 40 deletions cmake/modules/FindRedlandRdf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,45 @@
# RDF_DEFINITIONS - Compiler switches required for using Rdf
#
# Copyright (c) 2010 Paul Giblock <pgib@users.sourceforge.net>
# Copyright (c) 2014 Lukas W <lukaswhl@gmail.com>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#


if (RDF_LIBRARIES AND RDF_INCLUDE_DIRS)
# in cache already
set(RDF_FOUND TRUE)
else (RDF_LIBRARIES AND RDF_INCLUDE_DIRS)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(RDF redland)
endif (PKG_CONFIG_FOUND)

if (NOT RDF_INCLUDE_DIRS)
find_path(RDF_INCLUDE_DIR
NAMES rdf_init.h
)

set(RDF_INCLUDE_DIRS
${RDF_INCLUDE_DIR}
)
endif (NOT RDF_INCLUDE_DIRS)

if (NOT RDF_LIBRARIES)
find_library(RDF_LIBRARY
NAMES rdf
)

if (RDF_LIBRARY)
set(RDF_LIBRARIES
${RDF_LIBRARIES}
${RDF_LIBRARY}
)
endif (RDF_LIBRARY)
endif (NOT RDF_LIBRARIES)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Rdf DEFAULT_MSG RDF_LIBRARIES RDF_INCLUDE_DIRS)

# show the RDF_INCLUDE_DIRS and RDF_LIBRARIES variables only in the advanced view
mark_as_advanced(RDF_INCLUDE_DIRS RDF_LIBRARIES)

endif (RDF_LIBRARIES AND RDF_INCLUDE_DIRS)
find_package(PkgConfig)
# XXX: Redland depends on raptor and rasqal. Their include dirs are provided
# by pkg-config. When pkg-config is not available, building might fail.
# Additional FindRaptor.cmake and FindRasqal.cmake scripts may be needed?
if (PKG_CONFIG_FOUND)
pkg_check_modules(PC_RDF redland)
endif (PKG_CONFIG_FOUND)

find_path(RDF_INCLUDE_DIR
HINTS ${PC_RDF_INCLUDEDIR}
NAMES rdf_init.h
)

find_library(RDF_LIBRARY
HINTS ${PC_RDF_LIBDIR}
NAMES rdf
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Rdf DEFAULT_MSG RDF_LIBRARY RDF_INCLUDE_DIR)

set(RDF_INCLUDE_DIRS
${PC_RDF_INCLUDE_DIRS}
${RDF_INCLUDE_DIR}
)

set(RDF_LIBRARIES
${RDF_LIBRARIES}
${RDF_LIBRARY}
)

# show the RDF_INCLUDE_DIR and RDF_LIBRARY variables only in the advanced view
mark_as_advanced(RDF_INCLUDE_DIR RDF_LIBRARY)

# vim: tw=90 ts=8 sw=2 sts=2 et sta noai
66 changes: 31 additions & 35 deletions cmake/modules/FindSlv2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,50 @@
# SLV2_DEFINITIONS - Compiler switches required for using Slv2
#
# Copyright (c) 2010 Paul Giblock <pgib@users.sourceforge.net>
# Copyright (c) 2014 Lukas W <lukaswhl@gmail.com>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#

if (NOT SLV2_LIBRARIES OR NOT SLV2_INCLUDE_DIRS)
include(FindRedlandRdf)
set(RedlandRdf_FIND_REQUIRED ${Slv2_FIND_REQUIRED})
set(RedlandRdf_FIND_QUIETLY ${Slv2_FIND_QUIETLY})
find_package(RedlandRdf)

if (RDF_FOUND)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(_SLV2 slv2)
endif (PKG_CONFIG_FOUND)
if (RDF_FOUND)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(_SLV2 QUIET slv2)
endif (PKG_CONFIG_FOUND)

find_path(SLV2_INCLUDE_DIR
NAMES slv2/slv2.h
HINTS ${_SLV2_INCLUDEDIR}
PATH_SUFFIXES slv2
)
find_path(SLV2_INCLUDE_DIR
NAMES slv2/slv2.h
HINTS ${_SLV2_INCLUDEDIR}
PATH_SUFFIXES slv2
)

find_library(SLV2_LIBRARY
NAMES slv2
HINTS ${_SLV2_LIBDIR}
)
find_library(SLV2_LIBRARY
NAMES slv2
HINTS ${_SLV2_LIBDIR}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Slv2 DEFAULT_MSG SLV2_LIBRARY SLV2_INCLUDE_DIR)

if (SLV2_FOUND)
set(SLV2_INCLUDE_DIRS
${SLV2_INCLUDE_DIR}
${RDF_INCLUDE_DIRS}
)
set(SLV2_LIBRARIES
${SLV2_LIBRARY}
${RDF_INCLUDE}
)
endif (SLV2_FOUND)

if (SLV2_LIBRARY)
set(SLV2_LIBRARIES
${SLV2_LIBRARIES}
${SLV2_LIBRARY}
)
endif (SLV2_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Slv2 DEFAULT_MSG SLV2_LIBRARIES SLV2_INCLUDE_DIRS)

# show the SLV2_INCLUDE_DIRS and SLV2_LIBRARIES variables only in the advanced view
mark_as_advanced(SLV2_INCLUDE_DIRS SLV2_LIBRARIES)
endif (RDF_FOUND)
endif (NOT SLV2_LIBRARIES OR NOT SLV2_INCLUDE_DIRS)

if (SLV2_LIBRARIES AND SLV2_INCLUDE_DIRS)
# in cache already
set(SLV2_FOUND TRUE)
endif (SLV2_LIBRARIES AND SLV2_INCLUDE_DIRS)
# show the SLV2_INCLUDE_DIR and SLV2_LIBRARY variables only in the advanced view
mark_as_advanced(SLV2_INCLUDE_DIR SLV2_LIBRARY)
endif (RDF_FOUND)

# vim: tw=90 ts=8 sw=2 sts=2 et sta noai
2 changes: 1 addition & 1 deletion extensions/lv2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ add_library(Lv2 SHARED ${LV2_MOC_SRCS} ${LV2_SRCS})

target_link_libraries(Lv2
${QT_LIBRARIES}
${SLV2_LIBRARY}
${SLV2_LIBRARIES}
${RDF_LIBRARIES}
aggregation
extensionsystem
Expand Down
3 changes: 1 addition & 2 deletions extensions/oggvorbis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ qt4_wrap_cpp(OGGVORBIS_MOC_SRCS ${OGGVORBIS_MOC_HEADERS})

include_directories(..
${COMMON_LIBS_INCLUDE_DIR}
${VORBIS_INCLUDE_DIR}
${OGG_INCLUDE_DIR}
${OGGVORBIS_INCLUDE_DIR}
)

add_library(OggVorbis SHARED ${OGGVORBIS_MOC_SRCS}
Expand Down