source: calamares/trunk/fuentes/src/calamares/CMakeLists.txt @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 17 months ago

sync with github

File size: 1.7 KB
Line 
1project( calamares )
2
3add_definitions( -DUIDLLEXPORT_PRO )
4
5if( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
6    message( "Building in debug mode, enabling all debug updates" )
7endif()
8
9set( calamaresSources
10    main.cpp
11    CalamaresApplication.cpp
12    CalamaresWindow.cpp
13
14    progresstree/ProgressTreeDelegate.cpp
15    progresstree/ProgressTreeItem.cpp
16    progresstree/ProgressTreeModel.cpp
17    progresstree/ProgressTreeView.cpp
18    progresstree/ViewStepItem.cpp
19)
20
21include_directories(
22    .
23    ${CMAKE_CURRENT_BINARY_DIR}
24    ${CMAKE_CURRENT_BINARY_DIR}/../libcalamares
25
26    ../libcalamares
27    ../libcalamaresui
28)
29
30include( GNUInstallDirs )
31
32# Translations
33include( CalamaresAddTranslations )
34add_calamares_translations( ${CALAMARES_TRANSLATION_LANGUAGES} )
35
36set( final_src ${calamaresSources} ${calamaresRc} ${trans_outfile} )
37
38add_executable( calamares_bin ${final_src} )
39set_target_properties(calamares_bin
40    PROPERTIES
41        AUTOMOC TRUE
42        ENABLE_EXPORTS TRUE
43        RUNTIME_OUTPUT_NAME calamares
44)
45
46if( WITH_KF5Crash )
47    set( LINK_LIBRARIES
48        KF5::CoreAddons
49        KF5::Crash
50    )
51endif()
52
53target_link_libraries( calamares_bin
54    PRIVATE
55        ${CALAMARES_LIBRARIES}
56        calamaresui
57        Qt5::Core
58        Qt5::Widgets
59        ${LINK_LIBRARIES}
60)
61
62install( TARGETS calamares_bin
63    BUNDLE DESTINATION .
64    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
65)
66
67install( FILES ${CMAKE_SOURCE_DIR}/data/images/squid.svg
68    RENAME calamares.svg
69    DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps
70)
71
72if( BUILD_TESTING )
73    add_executable( loadmodule testmain.cpp )
74    target_link_libraries( loadmodule ${CALAMARES_LIBRARIES} Qt5::Core Qt5::Widgets calamaresui )
75    # Don't install, it's just for enable_testing
76endif()
Note: See TracBrowser for help on using the repository browser.