Skip to content

Commit

Permalink
build and install marisa-build
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Dec 25, 2023
1 parent 0d4e8ab commit e523bdf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ project(marisa VERSION 0.2.6)
# Official repo: https://github.com/s-yata/marisa-trie
# CMake script borrowed from https://github.com/Karry/osmscout-sailfish/blob/master/CMakeLists.txt

option(BUILD_TOOLS "Enable marisa tools" ON)

if(UNIX)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Weffc++ -Wextra -Wconversion")
endif()
Expand Down Expand Up @@ -75,3 +77,7 @@ install(
${CMAKE_CURRENT_BINARY_DIR}/marisa-version.cmake
DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/marisa)

if(BUILD_TOOLS)
add_subdirectory(tools)
endif()
12 changes: 12 additions & 0 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
add_executable(marisa-build
marisa-build.cc
cmdopt.cc
)

target_link_libraries(marisa-build
marisa
)

install(TARGETS marisa-build
DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
)

0 comments on commit e523bdf

Please sign in to comment.