File: CMakeLists.txt

package info (click to toggle)
kolf 4:18.04.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,972 kB
  • sloc: cpp: 19,333; xml: 243; makefile: 8; sh: 4
file content (160 lines) | stat: -rw-r--r-- 5,338 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
project(kolf)

cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.7.0")
set (KF5_MIN_VERSION "5.30.0")

find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets )
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
    Config
    ConfigWidgets
    CoreAddons
    Crash
    DBusAddons
    I18n
    KDELibs4Support
    KIO
    WidgetsAddons
    WindowSystem
    XmlGui
)

find_package(KF5KDEGames 4.9.0 REQUIRED)
find_package(Phonon4Qt5 CONFIG REQUIRED)

include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)

add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)

set(LIBKOLF_VERSION "5.0.0")

add_subdirectory(sounds)
add_subdirectory(courses)
add_subdirectory(pics)
add_subdirectory(graphics)
add_subdirectory(doc)

# we have a static copy of Box2D in our source tree
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external)

########### next target ###############

set(box2d_SRCS
        external/Box2D/Common/b2StackAllocator.cpp
        external/Box2D/Common/b2Settings.cpp
        external/Box2D/Common/b2Math.cpp
        external/Box2D/Common/b2BlockAllocator.cpp
        external/Box2D/Dynamics/b2Island.cpp
        external/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp
        external/Box2D/Dynamics/Contacts/b2LoopAndCircleContact.cpp
        external/Box2D/Dynamics/Contacts/b2CircleContact.cpp
        external/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp
        external/Box2D/Dynamics/Contacts/b2Contact.cpp
        external/Box2D/Dynamics/Contacts/b2LoopAndPolygonContact.cpp
        external/Box2D/Dynamics/Contacts/b2PolygonContact.cpp
        external/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp
        external/Box2D/Dynamics/Contacts/b2ContactSolver.cpp
        external/Box2D/Dynamics/b2WorldCallbacks.cpp
        external/Box2D/Dynamics/b2Body.cpp
        external/Box2D/Dynamics/b2ContactManager.cpp
        external/Box2D/Dynamics/Joints/b2MouseJoint.cpp
        external/Box2D/Dynamics/Joints/b2PulleyJoint.cpp
        external/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp
        external/Box2D/Dynamics/Joints/b2WeldJoint.cpp
        external/Box2D/Dynamics/Joints/b2Joint.cpp
        external/Box2D/Dynamics/Joints/b2FrictionJoint.cpp
        external/Box2D/Dynamics/Joints/b2LineJoint.cpp
        external/Box2D/Dynamics/Joints/b2RopeJoint.cpp
        external/Box2D/Dynamics/Joints/b2GearJoint.cpp
        external/Box2D/Dynamics/Joints/b2DistanceJoint.cpp
        external/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp
        external/Box2D/Dynamics/b2World.cpp
        external/Box2D/Dynamics/b2Fixture.cpp
        external/Box2D/Collision/b2DynamicTree.cpp
        external/Box2D/Collision/b2Distance.cpp
        external/Box2D/Collision/b2CollideCircle.cpp
        external/Box2D/Collision/Shapes/b2CircleShape.cpp
        external/Box2D/Collision/Shapes/b2EdgeShape.cpp
        external/Box2D/Collision/Shapes/b2PolygonShape.cpp
        external/Box2D/Collision/Shapes/b2LoopShape.cpp
        external/Box2D/Collision/b2BroadPhase.cpp
        external/Box2D/Collision/b2Collision.cpp
        external/Box2D/Collision/b2TimeOfImpact.cpp
        external/Box2D/Collision/b2CollidePolygon.cpp
        external/Box2D/Collision/b2CollideEdge.cpp
)


set(kolf_LIB_SRCS
    game.cpp
    kolf.cpp
    newgame.cpp
    canvasitem.cpp
    ball.cpp
    config.cpp
    scoreboard.cpp
    editor.cpp
    kcomboboxdialog.cpp
    itemfactory.cpp
    landscape.cpp
    objects.cpp
    obstacles.cpp
    overlay.cpp
    shape.cpp
    utils-animateditem.cpp
    tagaro/board.cpp
    tagaro/scene.cpp
    tagaro/spriteobjectitem.cpp
    ${box2d_SRCS}
)

add_library(kolfprivate SHARED ${kolf_LIB_SRCS})

target_link_libraries(kolfprivate
    Qt5::Gui
    Qt5::Widgets
    KF5::Crash
    KF5::DBusAddons
    KF5::KDELibs4Support
    KF5::KIOCore
    Phonon::phonon4qt5
    KF5KDEGames
)

set_target_properties(kolfprivate PROPERTIES VERSION ${LIBKOLF_VERSION} SOVERSION ${LIBKOLF_VERSION})
install(TARGETS kolfprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)


########### next target ###############

set(kolf_SRCS main.cpp)

file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/*-apps-kolf.png")
ecm_add_app_icon(kolf_SRCS ICONS ${ICONS_SRCS})
add_executable(kolf ${kolf_SRCS})

target_link_libraries( kolf kolfprivate)
install(TARGETS kolf  ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

########### install files ###############

install(PROGRAMS org.kde.kolf.desktop  DESTINATION  ${KDE_INSTALL_APPDIR})
install(FILES kolfui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kolf)
install(FILES intro tutorial.kolf tutorial.kolfgame  DESTINATION  ${KDE_INSTALL_DATADIR}/kolf)
#install(FILES ball.h game.h statedb.h config.h canvasitem.h object.h rtti.h vector.h floater.h slope.h  DESTINATION  ${KDE_INSTALL_INCLUDEDIR}/kolf COMPONENT Devel)
install(FILES org.kde.kolf.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})


feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
ki18n_install(po)
if (KF5DocTools_FOUND)
 kdoctools_install(po)
endif()