forked from nzinfo/csft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (51 loc) · 2.2 KB
/
CMakeLists.txt
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
cmake_minimum_required (VERSION 2.8)
FOREACH(policy CMP0012 CMP0013 CMP0014)
IF(POLICY ${policy})
CMAKE_POLICY(SET ${policy} NEW)
ENDIF()
ENDFOREACH()
# override default options which affects windows builds
# that is necessary to change /MD to /MT, and also to set libraries on win to implicitly defined
set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/c_flag_overrides.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_flag_overrides.cmake)
PROJECT(SPHINXSEARCH)
SET(SPHINXSEARCH_CMAKE_DIR "${SPHINXSEARCH_SOURCE_DIR}/cmake")
SET(CMAKE_MODULE_PATH "${SPHINXSEARCH_SOURCE_DIR}/cmake")
SET(EXTRA_LIBRARIES "")
if (WIN32)
include (select_library_dir)
else(WIN32)
OPTION(WITH_STEMMER "compile with stemmer support" ON)
IF (WITH_STEMMER)
# check whether we have in-source libstemmer
if (EXISTS "${SPHINXSEARCH_SOURCE_DIR}/libstemmer_c/include/libstemmer.h")
add_subdirectory(libstemmer_c)
ELSE (EXISTS "${SPHINXSEARCH_SOURCE_DIR}/libstemmer_c/include/libstemmer.h")
find_package(stemmer)
ENDIF (EXISTS "${SPHINXSEARCH_SOURCE_DIR}/libstemmer_c/include/libstemmer.h")
IF (STEMMER_FOUND)
SET (EXTRA_LIBRARIES ${EXTRA_LIBRARIES} ${STEMMER_LIBRARIES})
include_directories (${STEMMER_INCLUDE_DIR})
SET (USE_LIBSTEMMER 1)
ENDIF (STEMMER_FOUND)
ENDIF (WITH_STEMMER)
endif (WIN32)
#if(CMAKE_CONFIGURATION_TYPES)
if (NOT WIN32)
# dlopen doesn't affect windows anyway
OPTION(DL_EXPAT "Load libexpat using dlopen" ON)
endif (NOT WIN32)
include (helpers)
add_subdirectory (src)
install(FILES sphinx-min.conf.dist DESTINATION etc/sphinx COMPONENT config)
install(FILES doc/sphinx.html doc/sphinx.txt DESTINATION share/doc COMPONENT doc)
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_NAME "SphinxSearch")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "2")
set(CPACK_PACKAGE_VERSION_PATCH "0")
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "cssrobopec,libqt4-xml,libqt4-network,libqtgui4,treeupdatablereeti")
set(CPACK_PACKAGE_DESCRIPTION "Configure UExhibitor and launch missions")
set(CPACK_PACKAGE_CONTACT "Sphinx package builds <builds@sphinxsearch.com>")
#set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/Debian/postinst")
include (CPack)