delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / nepomuk / services / storage / CMakeLists.txt
blob535b064f8731b0bf22e686391620834d8a2e3fe6
1 project(storage)
3 include_directories(
4   ${SOPRANO_INCLUDE_DIR}
5   ${CMAKE_SOURCE_DIR}
6   ${NEPOMUK_INCLUDE_DIR}
7   )
9 set(storage_SRCS
10   storage.cpp
11   nepomukcore.cpp
12   modelcopyjob.cpp
13   repository.cpp
14   )
16 set(HAVE_CLUCENE ${CLucene_FOUND})
17 set(HAVE_SOPRANO_INDEX ${SopranoIndex_FOUND})
19 if(CLucene_FOUND AND SopranoIndex_FOUND)
21   include_directories(${CLUCENE_INCLUDE_DIR} ${CLUCENE_LIBRARY_DIR})
23   set(storage_SRCS
24     ${storage_SRCS}
25     cluceneanalyzer.cpp 
26     clucenetokenizer.cpp
27     clucenefilter.cpp
28     )
30   # CLucene requires exception support and has no support for visibility=hidden
31   # so we must use the default (i.e. public) value for -fvisibility
32   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
33   IF(NOT WIN32)
34     include(CheckCXXCompilerFlag)
35     # Only GCC supports these flags
36     IF(CMAKE_COMPILER_IS_GNUCXX)
37       check_cxx_compiler_flag(-fvisibility=hidden __NEPOMUK_HAVE_GCC_VISIBILITY)
38       if(__NEPOMUK_HAVE_GCC_VISIBILITY)
39         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default")
40       endif(__NEPOMUK_HAVE_GCC_VISIBILITY)
41     ENDIF(CMAKE_COMPILER_IS_GNUCXX)
42   ENDIF(NOT WIN32)
43 endif(CLucene_FOUND AND SopranoIndex_FOUND)
45 configure_file(nepomukstorage-config.h.cmake
46   ${CMAKE_CURRENT_BINARY_DIR}/nepomukstorage-config.h)
48 kde4_add_plugin(nepomukstorage ${storage_SRCS})
50 target_link_libraries(nepomukstorage
51   ${SOPRANO_LIBRARIES}
52   ${SOPRANO_SERVER_LIBRARIES}
53   ${KDE4_KDECORE_LIBS}
54   ${KDE4_KDEUI_LIBS}
55   ${NEPOMUK_LIBRARIES}
56   )
58 if(SopranoIndex_FOUND)
59   target_link_libraries(nepomukstorage ${SOPRANO_INDEX_LIBRARIES})
60   if(CLucene_FOUND)
61     target_link_libraries(nepomukstorage ${CLUCENE_LIBRARY})
62   endif(CLucene_FOUND)
63 endif(SopranoIndex_FOUND)
65 install(
66   FILES nepomukstorage.desktop
67   DESTINATION ${SERVICES_INSTALL_DIR})
69 install(
70   FILES nepomukstorage.notifyrc
71   DESTINATION ${DATA_INSTALL_DIR}/nepomukstorage)
73 install(
74   TARGETS nepomukstorage
75   DESTINATION ${PLUGIN_INSTALL_DIR})
76 # -----------------------------