diff options
author | Egor Pugin <egor.pugin@gmail.com> | 2020-05-02 02:16:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-02 02:16:27 +0300 |
commit | 6436825328cd3bf4a1c964bc84638bc93cfaff1e (patch) | |
tree | cd933546a1bfc38e44c9487c2c4327ed569673bd /CMakeLists.txt | |
parent | c378b6fb97a30175e957c8ce0bd8ad7bf5bcbe7f (diff) | |
parent | 3b7da8cd1e2f77d73cc19533fc657ba10a80c8cd (diff) |
Merge pull request #139 from OgreTransporter/master
Various fixes
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6587a48..871e9b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(TgBot) # options option(ENABLE_TESTS "Set to ON to enable building of tests" OFF) option(BUILD_SHARED_LIBS "Build tgbot-cpp shared/static library." OFF) +option(BUILD_DOCUMENTATION "Build doxygen API documentation." OFF) # sources set(CMAKE_CXX_STANDARD 14) @@ -58,6 +59,10 @@ else() find_package(Boost 1.59.0 COMPONENTS system REQUIRED) endif() include_directories(${Boost_INCLUDE_DIR}) +link_directories(${Boost_LIBRARY_DIR_RELEASE}) +if(NOT Boost_USE_STATIC_LIBS) + add_definitions(-DBOOST_ALL_DYN_LINK) +endif() set(LIB_LIST ${CMAKE_THREAD_LIBS_INIT} @@ -88,3 +93,18 @@ if (ENABLE_TESTS) enable_testing() add_subdirectory(test) endif() + +# Documentation +if(BUILD_DOCUMENTATION) + find_package(Doxygen REQUIRED) + add_custom_target(doc_doxygen ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Generating API documentation with Doxygen" + VERBATIM) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc/html/ TYPE DOC) +endif() + +if(BUILD_SHARED_LIBS) + add_definitions(-DTGBOT_DLL) +endif()
\ No newline at end of file |