You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637
  1. # CMakeLists.txt for devLib
  2. project(devLib)
  3. # Source files
  4. set(SRC
  5. ds1302.c maxdetect.c piNes.c
  6. gertboard.c piFace.c
  7. lcd128x64.c lcd.c
  8. scrollPhat.c
  9. piGlow.c
  10. )
  11. # Headers
  12. set(HEADERS
  13. ds1302.h maxdetect.h piNes.h
  14. gertboard.h piFace.h
  15. lcd128x64.h lcd.h
  16. scrollPhatFont.h scrollPhat.h
  17. piGlow.h
  18. )
  19. # Compiler flags
  20. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2 -Winline -pipe")
  21. # Add the library target
  22. add_library(wiringPiDev SHARED ${SRC})
  23. target_include_directories(wiringPiDev PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
  24. target_link_libraries(wiringPiDev PRIVATE wiringPi)
  25. # Set the library version
  26. set_target_properties(wiringPiDev PROPERTIES VERSION ${WIRINGPI_VERSION} SOVERSION ${WIRINGPI_VERSION_MAJOR})
  27. # Install headers
  28. install(FILES ${HEADERS} DESTINATION include COMPONENT Development)
  29. # Install the library
  30. install(TARGETS wiringPiDev LIBRARY DESTINATION lib COMPONENT Runtime NAMELINK_COMPONENT Development)