Commit 3dd5781a authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr

Port build system to KF5.

parent 6ede975c
......@@ -25,16 +25,27 @@
project(artikulate)
find_package(KDE4 4.11.1 REQUIRED)
include(KDE4Defaults)
cmake_minimum_required(VERSION 2.8.12)
find_package(ECM 0.0.11 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${QT4_INCLUDES})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -fexceptions)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(FeatureSummary)
find_package(Qt5 REQUIRED COMPONENTS
Widgets
)
find_package(KF5 REQUIRED COMPONENTS
Config
I18n
)
# subdirectories to build
add_subdirectory(data)
add_subdirectory(schemes)
add_subdirectory(doc)
# add_subdirectory(doc) //FIXME
add_subdirectory(src)
add_subdirectory(sounds)
add_subdirectory(images)
......@@ -42,14 +53,9 @@ add_subdirectory(icons)
add_subdirectory(libsound)
add_subdirectory(liblearnerprofile)
# Build Tests if KDE_TEST is on
if(KDE4_BUILD_TESTS)
enable_testing()
add_subdirectory(autotests)
endif(KDE4_BUILD_TESTS)
# files to install in the artikulate project root directory
install(PROGRAMS artikulate.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES artikulate.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata/)
macro_display_feature_log()
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -23,7 +23,8 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###
add_subdirectory(actions)
#add_subdirectory(actions)
kde4_install_icons(${ICON_INSTALL_DIR})
kde4_update_iconcache()
#FIXME
# kde4_install_icons(${ICON_INSTALL_DIR})
# kde4_update_iconcache()
......@@ -32,7 +32,7 @@ set(learnerprofile_LIB_SRCS
models/learninggoalmodel.cpp
)
kde4_add_library(artikulatelearnerprofile SHARED ${learnerprofile_LIB_SRCS})
add_library(artikulatelearnerprofile SHARED ${learnerprofile_LIB_SRCS})
target_link_libraries(
artikulatelearnerprofile
......
......@@ -36,7 +36,7 @@ set(sound_LIB_SRCS
qtgstreameroutputbackend.cpp
)
kde4_add_library(artikulatesound SHARED ${sound_LIB_SRCS})
add_library(artikulatesound SHARED ${sound_LIB_SRCS})
target_link_libraries(
artikulatesound
......
......@@ -64,11 +64,11 @@ set(artikulateCore_SRCS
)
# compile UI files
kde4_add_ui_files(artikulateCore_SRCS
qt5_wrap_ui(artikulateCore_SRCS
ui/newcoursedialog.ui
)
kde4_add_kcfg_files(artikulateCore_SRCS settings.kcfgc)
kde4_add_library(artikulatecore SHARED ${artikulateCore_SRCS})
kconfig_add_kcfg_files (artikulateCore_SRCS settings.kcfgc)
add_library(artikulatecore SHARED ${artikulateCore_SRCS})
target_link_libraries(artikulatecore
LINK_PRIVATE
artikulatelearnerprofile
......@@ -118,13 +118,13 @@ set(artikulate_SRCS
declarativeitems/applicationbackground.cpp
)
kde4_add_ui_files(artikulate_SRCS
qt5_wrap_ui (artikulate_SRCS
ui/resourcesdialogpage.ui
ui/sounddevicedialogpage.ui
ui/appearencedialogpage.ui
)
kde4_add_kcfg_files(artikulate_SRCS settings.kcfgc)
kde4_add_executable(artikulate ${artikulate_SRCS})
kconfig_add_kcfg_files (artikulate_SRCS settings.kcfgc)
add_executable(artikulate ${artikulate_SRCS})
target_link_libraries(artikulate
LINK_PRIVATE
artikulatelearnerprofile
......
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