Commit 8de9e315 authored by Boudhayan Gupta's avatar Boudhayan Gupta
Browse files

Generate export headers through CMake. Bumps CMake req to 3.0.2

parent 8da63fa7
cmake_minimum_required(VERSION 2.8.12)
project(libkcompactdisc)
cmake_minimum_required(VERSION 3.0.2)
project(libkcompactdisc VERSION 5.0.0)
set(QT5_REQUIRED_VERSION 5.4.0)
set(KF5_REQUIRED_VERSION 5.13.0)
......@@ -10,15 +10,16 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_D
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMPackageConfigHelpers)
include(CMakePackageConfigHelpers)
include(ECMGenerateHeaders)
include(ECMSetupVersion)
include(ECMGeneratePriFile)
include(GenerateExportHeader)
include(FeatureSummary)
# Version Setup
ecm_setup_version("5.0.0"
ecm_setup_version(PROJECT
VARIABLE_PREFIX KCOMPACTDISC
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/kcompactdisc_version.h
PACKAGE_VERSION_FILE ${CMAKE_CURRENT_BINARY_DIR}/KF5CompactDiscConfigVersion.cmake
......@@ -45,7 +46,7 @@ add_subdirectory(tests)
set(CMAKECONFIG_INSTALL_DIR ${CMAKECONFIG_INSTALL_PREFIX}/KF5CompactDisc)
ecm_configure_package_config_file(
configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/KF5CompactDiscConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/KF5CompactDiscConfig.cmake
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
......
......@@ -88,6 +88,7 @@ ecm_generate_headers(KCOMPACTDISC_HEADERS
PREFIX KCompactDisc
REQUIRED_HEADERS KCOMPACTDISC_REQ_HEADERS
)
generate_export_header(KF5CompactDisc BASE_NAME kcompactdisc)
ecm_generate_pri_file(
BASE_NAME KCompactDisc
......@@ -96,7 +97,9 @@ ecm_generate_pri_file(
FILENAME_VAR PRI_FILENAME
)
install(TARGETS KF5CompactDisc EXPORT KF5CompactDiscTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES ${KCOMPACTDISC_HEADERS} DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KCompactDisc/KCompactDisc COMPONENT Devel)
install(FILES ${KCOMPACTDISC_REQ_HEADERS} DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KCompactDisc/kcompactdisc COMPONENT Devel)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kcompactdisc_export.h DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KCompactDisc/kcompactdisc COMPONENT Devel)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
......@@ -27,23 +27,7 @@
#include <QUrl>
#include <QTimer>
#include <kdemacros.h>
#if defined Q_OS_WIN
#ifndef KCOMPACTDISC_EXPORT
# ifdef MAKE_KCOMPACTDISC_LIB
# define KCOMPACTDISC_EXPORT KDE_EXPORT
# else
# define KCOMPACTDISC_EXPORT KDE_IMPORT
# endif
#endif
#else /* UNIX */
/* export statements for unix */
#define KCOMPACTDISC_EXPORT KDE_EXPORT
#endif
#include "kcompactdisc_export.h"
class KCompactDiscPrivate;
......
Supports Markdown
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