summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: 9413217c856f90b8e39837782e818732536da927 (plain)
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
### ------- sub dirs -------

ADD_SUBDIRECTORY( data )
add_subdirectory(settings)
add_subdirectory(plugins)

### ------- sources --------

# rekonq
set(rekonq_SRCS
    #----------------------------------------
    main.cpp application.cpp application_instance.cpp application.hpp
    #----------------------------------------
    rekonqwindow.cpp rekonqwindow.h rekonqwindow.ui
    taskmanager.cpp taskmanager.h taskmanager.ui
    #----------------------------------------
    plugins/rplugininterface.hpp
    #----------------------------------------
)
list(TRANSFORM rekonq_SRCS PREPEND src/)
set(rekonq_SRCS ${rekonq_SRCS} PARENT_SCOPE)


# Nepomuk OPTIONAL src files
IF(NepomukCore_FOUND)
    SET( rekonq_KDEINIT_SRCS
            ${rekonq_KDEINIT_SRCS}
            urlbar/resourcelinkdialog.cpp
            urlbar/newresourcedialog.cpp
            nepomuk/utils/simpleresourcemodel.cpp
            nepomuk/utils/resourcemodel.cpp
    )
ENDIF(NepomukCore_FOUND)


# Opera sync optional src files
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
    SET( rekonq_KDEINIT_SRCS
            ${rekonq_KDEINIT_SRCS}
            sync/operasynchandler.cpp
    )
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)

### ------------- INCLUDING DIRECTORIES...

# Nepomuk optional include directories
IF(SOPRANO_FOUND AND NepomukCore_FOUND)
    INCLUDE_DIRECTORIES(${SOPRANO_INCLUDE_DIR}
                        ${NEPOMUK_CORE_INCLUDE_DIR}
    )

    FIND_PACKAGE(Soprano REQUIRED)
    INCLUDE(SopranoAddOntology)
ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND)

# Opera sync optional include directories
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
    INCLUDE_DIRECTORIES(${QCA2_INCLUDE_DIR}
                        ${QTOAUTH_INCLUDE_DIR}
    )
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)

# KActivities optional include directories
IF(KActivities_FOUND)
    INCLUDE_DIRECTORIES(${KACTIVITIES_INCLUDE_DIRS}
    )
ENDIF(KActivities_FOUND)


### -------------- ADDING APPLICATION ICON...

#KDE4_ADD_APP_ICON( rekonq_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-rekonq.png )


### -------------- ADDING APPLICATION KCFG FILES...

#KDE4_ADD_KCFG_FILES( rekonq_KDEINIT_SRCS rekonq.kcfgc )


### --------------- TARGETTING LINK LIBRARIES...


# Nepomuk optional target link libraries
IF(SOPRANO_FOUND AND NepomukCore_FOUND)
    TARGET_LINK_LIBRARIES(  kdeinit_rekonq
                            ${NEPOMUK_CORE_LIBRARY}
                            ${SOPRANO_LIBRARIES}
    )
ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND)

# KActivities optional target link libraries
IF(HAVE_KACTIVITIES)
    TARGET_LINK_LIBRARIES(  kdeinit_rekonq
                            ${KACTIVITIES_LIBRARY}
    )
ENDIF(HAVE_KACTIVITIES)

# Opera sync optional link libraries
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
    TARGET_LINK_LIBRARIES(  kdeinit_rekonq
                            ${QCA2_LIBRARY}
                            ${QTOAUTH_LIBRARY}
    )
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)

# tests
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
    add_executable(test_application test/test_application.cpp test/application_mock.hpp
        application_instance.cpp application.hpp)
    target_compile_definitions(test_application PRIVATE REKONQ_TEST)
    target_link_libraries(test_application GTest::gtest GTest::gmock GTest::gtest_main SingleApplication::SingleApplication)
    gtest_discover_tests(test_application)
endif()

### ------------ INSTALL FILES...

#INSTALL( TARGETS rekonq ${INSTALL_TARGETS_DEFAULT_ARGS} )
#INSTALL( TARGETS kdeinit_rekonq  ${INSTALL_TARGETS_DEFAULT_ARGS} )

# kwebapp script install (provided for retro-compatibility...)
#FILE( COPY data/kwebapp DESTINATION ${BIN_INSTALL_DIR}
#        FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )

#INSTALL( FILES rekonq.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
#INSTALL( FILES webwindow/rekonqui.rc  DESTINATION  ${DATA_INSTALL_DIR}/rekonq )