-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
cmake_minimum_required(VERSION 3.6.0) | ||
|
||
project(geocoder-nlp | ||
VERSION 1.0.0 | ||
DESCRIPTION "Geocoder NLP") | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
|
||
include(FindPkgConfig) | ||
include(FeatureSummary) | ||
include(GNUInstallDirs) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
pkg_check_modules(MARISA marisa IMPORTED_TARGET) | ||
pkg_check_modules(KYOTOCABINET kyotocabinet IMPORTED_TARGET) | ||
pkg_check_modules(POSTAL postal IMPORTED_TARGET) | ||
pkg_check_modules(SQLITE3 sqlite3 IMPORTED_TARGET) | ||
|
||
set(SRC | ||
src/geocoder.cpp | ||
src/postal.cpp) | ||
|
||
set(HEAD | ||
src/geocoder.h | ||
src/postal.h) | ||
|
||
# sqlite3pp include | ||
include_directories(thirdparty/sqlite3pp/headeronly_src) | ||
include_directories(src) | ||
|
||
# demo codes | ||
add_executable(geocoder-nlp | ||
demo/geocoder-nlp.cpp | ||
${SRC} | ||
${HEAD}) | ||
|
||
target_link_libraries(geocoder-nlp | ||
-lmarisa -lkyotocabinet -lpostal -lsqlite3) | ||
|
||
add_executable(nearby-line | ||
demo/nearby-line.cpp | ||
${SRC} | ||
${HEAD}) | ||
|
||
target_link_libraries(nearby-line | ||
-lmarisa -lkyotocabinet -lpostal -lsqlite3) | ||
|
||
add_executable(nearby-point | ||
demo/nearby-point.cpp | ||
${SRC} | ||
${HEAD}) | ||
|
||
target_link_libraries(nearby-point | ||
-lmarisa -lkyotocabinet -lpostal -lsqlite3) | ||
|
||
|
||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) | ||
|