diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index ff6abb6..c5c5afa 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -7,6 +7,7 @@ if(NOT SNORE_REVISION) endif() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/version.cpp") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LibsnoreConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake" @ONLY) QT4_ADD_RESOURCES(SNORENOTIFY_RCS ${SNORE_RCS}) @@ -71,5 +72,5 @@ install(EXPORT LibsnoreTarget DESTINATION lib/cmake/libsnore${SNORE_CamelCase_SU install(FILES ${SnoreNotify_HDR} DESTINATION include/snore/core) -install(FILES LibsnoreConfig.cmake DESTINATION lib/cmake/libsnore${SNORE_CamelCase_SUFFIX} RENAME Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake DESTINATION lib/cmake/libsnore${SNORE_CamelCase_SUFFIX}) diff --git a/src/core/LibsnoreConfig.cmake b/src/core/LibsnoreConfig.cmake deleted file mode 100644 index d147e8b..0000000 --- a/src/core/LibsnoreConfig.cmake +++ /dev/null @@ -1,3 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/LibsnoreTarget.cmake") -set(LIBSNORE_FOUND TRUE) -set(LIBSNORE_LIBRARIES Snore::Libsnore) \ No newline at end of file diff --git a/src/core/LibsnoreConfig.cmake.in b/src/core/LibsnoreConfig.cmake.in new file mode 100644 index 0000000..38eb7e1 --- /dev/null +++ b/src/core/LibsnoreConfig.cmake.in @@ -0,0 +1,8 @@ +include("${CMAKE_CURRENT_LIST_DIR}/LibsnoreTarget.cmake") +set(LIBSNORE_FOUND TRUE) +set(LIBSNORE_LIBRARIES Snore::Libsnore) + +if(NOT @WITH_QT4@)#WITH_QT4 + find_package(Qt5Network REQUIRED) + find_package(Qt5Widgets REQUIRED) +endif() \ No newline at end of file