Skip to content

Commit

Permalink
Merge pull request #655 from sanpeqf/build-install
Browse files Browse the repository at this point in the history
build install: added docs installation option
  • Loading branch information
sanpeqf authored Feb 7, 2025
2 parents 56ba640 + a28a281 commit 7b667de
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ option(BFDEV_DEVEL "Enable development mode" OFF)
option(BFDEV_STRICT "Enable strict compilation" OFF)
option(BFDEV_EXAMPLES "Build examples" OFF)
option(BFDEV_TESTSUITE "Build testsuite" OFF)
option(BFDEV_DOCS "Install Documentation" OFF)

option(BFDEV_ASAN "Enable Address Sanitizer" OFF)
option(BFDEV_UBSAN "Enable Undefined Behaviour Sanitizer" OFF)
Expand All @@ -69,6 +70,7 @@ if(BFDEV_DEVEL)
set(BFDEV_STRICT ON)
set(BFDEV_EXAMPLES ON)
set(BFDEV_TESTSUITE ON)
set(BFDEV_DOCS ON)
set(BFDEV_ASAN ON)
set(BFDEV_UBSAN ON)
set(BFDEV_GCOV ON)
Expand Down Expand Up @@ -134,21 +136,13 @@ if(${CMAKE_PROJECT_NAME} STREQUAL "bfdev")
)

install(FILES
${BFDEV_GENERATED_PATH}/bfdev.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(FILES
${PROJECT_SOURCE_DIR}/README.md
${PROJECT_SOURCE_DIR}/AUTHORS
${PROJECT_SOURCE_DIR}/COPYING
${PROJECT_SOURCE_DIR}/COPYING.LIB
DESTINATION ${CMAKE_INSTALL_DOCDIR}
${BFDEV_CONFIGURE}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/bfdev
)

install(FILES
${BFDEV_CONFIGURE}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/bfdev
${BFDEV_GENERATED_PATH}/bfdev.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(DIRECTORY
Expand All @@ -158,10 +152,20 @@ if(${CMAKE_PROJECT_NAME} STREQUAL "bfdev")
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(DIRECTORY
${BFDEV_DOCUMENT_PATH}
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
if(BFDEV_DOCS)
install(FILES
${PROJECT_SOURCE_DIR}/README.md
${PROJECT_SOURCE_DIR}/AUTHORS
${PROJECT_SOURCE_DIR}/COPYING
${PROJECT_SOURCE_DIR}/COPYING.LIB
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)

install(DIRECTORY
${BFDEV_DOCUMENT_PATH}
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
endif()

install(TARGETS
bfdev_static bfdev_shared
Expand Down

0 comments on commit 7b667de

Please sign in to comment.