set (direct_bt_LIB_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/jaulib/include ${PROJECT_SOURCE_DIR}/api ${PROJECT_SOURCE_DIR}/api/direct_bt ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/tinycrypt/lib/include ) include_directories( ${direct_bt_LIB_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${SYS_INCLUDE_DIRS} ) set (direct_bt_LIB_SRCS ${PROJECT_SOURCE_DIR}/tinycrypt/lib/source/aes_encrypt.c ${PROJECT_SOURCE_DIR}/tinycrypt/lib/source/utils.c ${PROJECT_SOURCE_DIR}/jaulib/src/dfa_utf8_decode.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/environment.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/debug.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/basic_types.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/base_codec.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/eui48.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/file_util.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/uuid.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/service_runner.cpp ${PROJECT_SOURCE_DIR}/jaulib/src/simple_timer.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/ieee11073/DataTypes.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/ATTPDUTypes.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTAdapter.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTDevice.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTDeviceRegistry.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattDesc.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattChar.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattCmd.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattService.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattHandler.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTGattServerHandler.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTManager.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTSecurityRegistry.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTTypes0.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/BTTypes1.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/DBGattServer.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/GATTNumbers.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/HCIComm.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/HCIHandler.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/HCITypes.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/L2CAPComm.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/MgmtTypes.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/SMPHandler.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/SMPTypes.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/SMPKeyBin.cpp ${PROJECT_SOURCE_DIR}/src/direct_bt/SMPCrypto.cpp # autogenerated files ${CMAKE_CURRENT_BINARY_DIR}/../version.c ) add_library (direct_bt SHARED ${direct_bt_LIB_SRCS}) target_link_libraries ( direct_bt ${LIBUNWIND_LIBNAME} ${CMAKE_THREAD_LIBS_INIT} ) if(USE_STRIP) add_custom_command(TARGET direct_bt POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}direct_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_SHORT} COMMENT "stripping direct_bt" VERBATIM ) endif(USE_STRIP) set_target_properties( direct_bt PROPERTIES SOVERSION ${direct_bt_VERSION_MAJOR} VERSION ${direct_bt_VERSION_SHORT} ) install (DIRECTORY ${PROJECT_SOURCE_DIR}/api/direct_bt/ DESTINATION include/direct_bt) macro (tinyb_CREATE_INSTALL_PKGCONFIG generated_file install_location) configure_file (${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} DESTINATION ${install_location}) endmacro (tinyb_CREATE_INSTALL_PKGCONFIG) tinyb_create_install_pkgconfig (direct_bt.pc lib${LIB_SUFFIX}/pkgconfig) install(TARGETS direct_bt LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})