preface options in libftdi with LIBFTDI_
parent
d042086c90
commit
d680f5dfc6
|
|
@ -133,6 +133,9 @@ set_property(TARGET icsneocpp PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
# libftdi
|
# libftdi
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
target_include_directories(icsneocpp PUBLIC third-party/libftdi/ftdipp)
|
target_include_directories(icsneocpp PUBLIC third-party/libftdi/ftdipp)
|
||||||
|
set(LIBFTDI_DOCUMENTATION OFF)
|
||||||
|
set(LIBFTDI_BUILD_TESTS OFF)
|
||||||
|
set(LIBFTDI_INSTALL OFF)
|
||||||
add_subdirectory(third-party/libftdi)
|
add_subdirectory(third-party/libftdi)
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
|
||||||
set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
|
set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
|
||||||
set(CPACK_COMPONENT_HEADERS_GROUP "Development")
|
set(CPACK_COMPONENT_HEADERS_GROUP "Development")
|
||||||
|
|
||||||
option ( STATICLIBS "Build static libraries" ON )
|
option ( LIBFTDI_STATICLIBS "Build static libraries" ON )
|
||||||
|
|
||||||
# guess LIB_SUFFIX, don't take debian multiarch into account
|
# guess LIB_SUFFIX, don't take debian multiarch into account
|
||||||
if ( NOT DEFINED LIB_SUFFIX )
|
if ( NOT DEFINED LIB_SUFFIX )
|
||||||
|
|
@ -114,14 +114,14 @@ add_custom_target(dist
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
option ( BUILD_TESTS "Build unit tests with Boost Unit Test framework" ON )
|
option ( LIBFTDI_BUILD_TESTS "Build unit tests with Boost Unit Test framework" ON )
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
option ( DOCUMENTATION "Generate API documentation with Doxygen" ON )
|
option ( LIBFTDI_DOCUMENTATION "Generate API documentation with Doxygen" ON )
|
||||||
|
|
||||||
|
|
||||||
find_package ( Doxygen )
|
find_package ( Doxygen )
|
||||||
if ( DOCUMENTATION AND DOXYGEN_FOUND )
|
if ( LIBFTDI_DOCUMENTATION AND DOXYGEN_FOUND )
|
||||||
|
|
||||||
# Find doxy config
|
# Find doxy config
|
||||||
message(STATUS "Doxygen found.")
|
message(STATUS "Doxygen found.")
|
||||||
|
|
@ -142,9 +142,9 @@ if ( DOCUMENTATION AND DOXYGEN_FOUND )
|
||||||
add_custom_target(docs ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html)
|
add_custom_target(docs ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html)
|
||||||
|
|
||||||
message(STATUS "Generating API documentation with Doxygen")
|
message(STATUS "Generating API documentation with Doxygen")
|
||||||
else(DOCUMENTATION AND DOXYGEN_FOUND)
|
else(LIBFTDI_DOCUMENTATION AND DOXYGEN_FOUND)
|
||||||
message(STATUS "Not generating API documentation")
|
message(STATUS "Not generating API documentation")
|
||||||
endif(DOCUMENTATION AND DOXYGEN_FOUND)
|
endif(LIBFTDI_DOCUMENTATION AND DOXYGEN_FOUND)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(ftdipp)
|
add_subdirectory(ftdipp)
|
||||||
|
|
@ -228,14 +228,17 @@ else ()
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
option ( LIBFTDI_INSTALL "Generate install step" ON )
|
||||||
|
|
||||||
install ( FILES
|
if (LIBFTDI_INSTALL)
|
||||||
|
install ( FILES
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1ConfigVersion.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1ConfigVersion.cmake
|
||||||
cmake/UseLibFTDI1.cmake
|
cmake/UseLibFTDI1.cmake
|
||||||
|
|
||||||
DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR}
|
DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR}
|
||||||
)
|
)
|
||||||
|
endif (LIBFTDI_INSTALL)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Optional unit test
|
# Optional unit test
|
||||||
|
|
||||||
if(BUILD_TESTS)
|
if(LIBFTDI_BUILD_TESTS)
|
||||||
|
|
||||||
find_package(Boost COMPONENTS unit_test_framework)
|
find_package(Boost COMPONENTS unit_test_framework)
|
||||||
|
|
||||||
|
|
@ -31,8 +31,8 @@ if(BUILD_TESTS)
|
||||||
|
|
||||||
endif(Boost_UNIT_TEST_FRAMEWORK_FOUND)
|
endif(Boost_UNIT_TEST_FRAMEWORK_FOUND)
|
||||||
|
|
||||||
else(BUILD_TESTS)
|
else(LIBFTDI_BUILD_TESTS)
|
||||||
|
|
||||||
message(STATUS "NOT building unit test")
|
message(STATUS "NOT building unit test")
|
||||||
|
|
||||||
endif(BUILD_TESTS)
|
endif(LIBFTDI_BUILD_TESTS)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue