-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
52 lines (42 loc) · 1.38 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
cmake_minimum_required (VERSION 2.8)
project (Wunner)
set (Wunner_VERSION_MAJOR 1)
set (Wunner_VERSION_MINOR 0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall")
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include_directories (inc)
include_directories (lib)
set (BUILD_SHARED_LIBRARIES OFF)
set (CMAKE_EXE_LINKER_FLAGS "-static")
set (CMAKE_FIND_LIBRARY_SUFFIXES .a)
set (CMAKE_EXE_LINK_DYNAMIC_C_FLAGS) # remove -Wl,-Bdynamic
set (CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
set (CMAKE_SHARED_LIBRARY_C_FLAGS) # remove -fPIC
set (CMAKE_SHARED_LIBRARY_CXX_FLAGS)
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) # remove -rdynamic
set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
add_library (porter_stemmer lib/PorterStemmer/porter2_stemmer.cpp)
find_package (Threads REQUIRED)
set (LIBS_WUNNER
inc/autocomplete.hpp
inc/crawler.hpp
inc/crawler_info.hpp
inc/index_builder.hpp
inc/parser.hpp
inc/query.hpp
inc/validator.hpp
src/autocomplete.cpp
src/crawler.cpp
src/index_builder.cpp
src/parser.cpp
src/query.cpp
src/validator.cpp
)
add_library (wunner_libs ${LIBS_WUNNER})
set (LIBS_TO_LINK
wunner_libs
porter_stemmer
${CMAKE_THREAD_LIBS_INIT}
)
add_executable (wunner_search src/main.cpp)
target_link_libraries (wunner_search ${LIBS_TO_LINK})