Commit c2059928 authored by Luca Giambonini's avatar Luca Giambonini

cmakelists cleanup

parent 46f0a5d1
......@@ -48,8 +48,6 @@ add_definitions(#-DQT_NO_CAST_TO_ASCII
-DQT_USE_QSTRINGBUILDER
)
include(CMakePackageConfigHelpers) # Used to create CMake config files
find_package(Qt5 5.2.0 REQUIRED CONFIG COMPONENTS Core Test Concurrent DBus Widgets)
find_package(LibArchive REQUIRED)
find_package(Sqlite REQUIRED)
......@@ -64,10 +62,12 @@ set(STATE_DIR "/var" CACHE "Directory to store cache data and log files, usually
set(CONFIGURATION_DIR "/etc" CACHE "Directory to store Akabei’s configuration files" STRING)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/akabeicoreconfig.h.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/akabeicoreconfig.h"
${CMAKE_CURRENT_SOURCE_DIR}/akabeicoreconfig.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/akabeicoreconfig.h
IMMEDIATE @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(lib)
add_subdirectory(tools)
add_subdirectory(etc)
......@@ -76,11 +76,6 @@ add_subdirectory(translations)
include(UseDoxygen)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
### Source tarball autogeneration ###
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${AKABEI_VERSION_STRING})
add_custom_target(dist
......
......@@ -97,7 +97,8 @@ add_library(akabeicore SHARED ${AKABEI_CORE_SRCS} ${AKABEI_OPERATION_SRCS} ${AKA
# * header can be included by C++ code `#include <foo/Bar.h>`
target_include_directories(
akabeicore PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
"$<INSTALL_INTERFACE:include/akabeicore>"
)
set_target_properties(akabeicore PROPERTIES AUTOMOC TRUE)
......@@ -166,6 +167,7 @@ install(FILES ${AKABEI_CORE_HDRS} DESTINATION ${INCLUDES_INSTALL_DIR})
install(FILES ${AKABEI_OPERATION_HDRS} DESTINATION ${INCLUDES_INSTALL_DIR}/operations)
install(FILES ${AKABEI_ARCHIVE_HDRS} DESTINATION ${INCLUDES_INSTALL_DIR}/libarchive++)
# Config
# * <prefix>/lib/cmake/AkabeiCore/AkabeiCoreConfig.cmake
# * <prefix>/lib/cmake/AkabeiCore/AkabeiCoreConfigVersion.cmake
......
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