diff --git a/3rdparty/singleapplication/CMakeLists.txt b/3rdparty/singleapplication/CMakeLists.txt index b1cfabfd..0155998f 100644 --- a/3rdparty/singleapplication/CMakeLists.txt +++ b/3rdparty/singleapplication/CMakeLists.txt @@ -7,7 +7,6 @@ QT5_WRAP_CPP(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS}) ADD_LIBRARY(singleapplication STATIC ${SINGLEAPP-SOURCES} ${SINGLEAPP-SOURCES-MOC}) target_link_libraries(singleapplication Qt5::Core Qt5::Widgets Qt5::Network) - set(SINGLECOREAPP-SOURCES singlecoreapplication.cpp singlecoreapplication_p.cpp) set(SINGLECOREAPP-MOC-HEADERS singlecoreapplication.h singlecoreapplication_p.h) QT5_WRAP_CPP(SINGLECOREAPP-SOURCES-MOC ${SINGLECOREAPP-MOC-HEADERS}) diff --git a/CMakeLists.txt b/CMakeLists.txt index 70c37c3b..7973385d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,10 +187,6 @@ if (TAGLIB_FOUND AND USE_SYSTEM_TAGLIB) else() message(WARNING "Using system taglib library. Version 1.11.1 or less has a bug corrupting Ogg files, make sure your systems version has been patched!") endif() - set(CMAKE_REQUIRED_INCLUDES "${TAGLIB_INCLUDE_DIRS}") - set(CMAKE_REQUIRED_LIBRARIES "${TAGLIB_LIBRARIES}") - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_LIBRARIES) find_path(HAVE_TAGLIB_DSFFILE_H taglib/dsffile.h) if(HAVE_TAGLIB_DSFFILE_H) set(HAVE_TAGLIB_DSFFILE ON) @@ -206,8 +202,8 @@ else() endif() # SingleApplication -find_library(SINGLEAPPLICATION singleapplication) -find_library(SINGLECOREAPPLICATION singlecoreapplication) +pkg_check_modules(SINGLEAPPLICATION singleapplication) +pkg_check_modules(SINGLECOREAPPLICATION singlecoreapplication) if (SINGLEAPPLICATION_FOUND AND SINGLECOREAPPLICATION_FOUND) option(USE_SYSTEM_SINGLEAPPLICATION "Use system SingleApplication/SingleCoreApplication libraries" ON) else(SINGLEAPPLICATION_FOUND AND SINGLECOREAPPLICATION_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 57ed26eb..d7074f81 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,6 +71,8 @@ endif() link_directories(${TAGLIB_LIBRARY_DIRS}) include_directories(${TAGLIB_INCLUDE_DIRS}) +link_directories(${SINGLEAPPLICATION_LIBRARY_DIRS}) +link_directories(${SINGLECOREAPPLICATION_LIBRARY_DIRS}) include_directories(${SINGLEAPPLICATION_INCLUDE_DIRS}) include_directories(${SINGLECOREAPPLICATION_INCLUDE_DIRS}) @@ -1029,8 +1031,9 @@ if (UNIX AND NOT APPLE) endif () endif () -add_dependencies(strawberry_lib singleapplication singlecoreapplication) - +if(NOT USE_SYSTEM_SINGLEAPPLICATION) +add_dependencies(strawberry_lib ${SINGLEAPPLICATION_LIBRARIES} ${SINGLECOREAPPLICATION_LIBRARIES}) +endif() ###############################################################################