4 set(cpp_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.cpp CACHE INTERNAL "List of cpp sources" )
5 set(cpp_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.hpp CACHE INTERNAL "List of cpp headers" )
8 include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}
9 ${CMAKE_CURRENT_SOURCE_DIR}
10 ${CMAKE_SOURCE_DIR}/src)
12 include_directories(${Boost_INCLUDE_DIRS})
15 add_library(ftdipp1 SHARED ${cpp_sources})
17 math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatibility with previous releases
18 set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 3)
20 # Prevent clobbering each other during the build
21 set_target_properties(ftdipp1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
24 target_link_libraries(ftdipp1 ftdi1 ${LIBUSB_LIBRARIES} ${BOOST_LIBRARIES})
26 install ( TARGETS ftdipp1
27 RUNTIME DESTINATION bin
28 LIBRARY DESTINATION lib${LIB_SUFFIX}
29 ARCHIVE DESTINATION lib${LIB_SUFFIX}
34 add_library(ftdipp1-static STATIC ${cpp_sources})
35 set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
36 set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
38 install ( TARGETS ftdipp1-static
39 ARCHIVE DESTINATION lib${LIB_SUFFIX}
44 install ( FILES ${cpp_headers}
45 DESTINATION include/${PROJECT_NAME}