ADD_LIBRARY( k8055-${VERSION} SHARED libk8055.c ) ADD_LIBRARY( k8055-static-${VERSION} STATIC libk8055.c ) INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${LIBUSB_INCLUDE_DIR} ) TARGET_LINK_LIBRARIES( k8055-${VERSION} ${LIBUSB_LDFLAGS} m ) SET_TARGET_PROPERTIES(k8055-${VERSION} PROPERTIES PUBLIC_HEADER k8055.h ) INSTALL(TARGETS k8055-${VERSION} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include ) ADD_LIBRARY( k8055++-${VERSION} SHARED libk8055.cpp ) ADD_DEPENDENCIES(k8055++-${VERSION} k8055-${VERSION}) ADD_LIBRARY( k8055++-static-${VERSION} STATIC libk8055.cpp ) ADD_DEPENDENCIES(k8055++-static-${VERSION} k8055-${VERSION}) INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ) TARGET_LINK_LIBRARIES( k8055++-${VERSION} k8055-${VERSION} ) SET_TARGET_PROPERTIES(k8055++-${VERSION} PROPERTIES PUBLIC_HEADER k8055++.h ) INSTALL(TARGETS k8055++-${VERSION} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include ) ADD_EXECUTABLE(k8055 WIN32 MACOSX_BUNDLE main.c ) TARGET_LINK_LIBRARIES(k8055 k8055-${VERSION} ) ADD_DEPENDENCIES(k8055 k8055-${VERSION}) CONFIGURE_FILE(k8055.pc.in k8055.pc @ONLY) INSTALL(TARGETS k8055 RUNTIME DESTINATION bin BUNDLE DESTINATION bin ) INSTALL(FILES k8055.1.gz DESTINATION man/man1/ ) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/k8055.pc DESTINATION lib/pkgconfig )