Add docopt to CMakeLists
This commit is contained in:
parent
fe6b242501
commit
ff8af2a5a3
|
@ -29,6 +29,19 @@ if (NOT mstch_FOUND)
|
|||
include_directories(${source_dir}/include)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(ext-docopt
|
||||
GIT_REPOSITORY https://github.com/docopt/docopt.cpp
|
||||
INSTALL_COMMAND ""
|
||||
EXCLUDE_FROM_ALL 1
|
||||
)
|
||||
|
||||
add_library(docopt IMPORTED STATIC GLOBAL)
|
||||
add_dependencies(docopt ext-docopt)
|
||||
|
||||
ExternalProject_Get_Property(ext-docopt source_dir binary_dir)
|
||||
set_target_properties(docopt PROPERTIES "IMPORTED_LOCATION" "${binary_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}docopt${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
include_directories(${source_dir})
|
||||
|
||||
##########################################
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
|
|
@ -14,8 +14,8 @@ add_executable(Lexesis
|
|||
inputparser.cpp
|
||||
template.cpp
|
||||
)
|
||||
target_link_libraries(Lexesis Lexesis-backends mstch::mstch)
|
||||
target_link_libraries(Lexesis Lexesis-backends mstch::mstch docopt)
|
||||
|
||||
install(TARGETS Lexesis
|
||||
RUNTIME DESTINATION bin
|
||||
DESTINATION man
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue