Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

CMakeLists.txt 756 B

1234567891011121314151617181920212223242526272829303132333435
  1. # CMakeLists.txt for wiringPiD
  2. project(wiringPiD)
  3. # Source files
  4. set(SRC wiringpid.c network.c runRemote.c daemonise.c)
  5. # Add the executable
  6. add_executable(wiringpid ${SRC})
  7. # Set C compiler flags
  8. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra")
  9. # Include directories
  10. include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  11. # Link libraries
  12. find_library(WIRINGPI_LIB wiringPi)
  13. find_library(WIRINGPIDEV_LIB wiringPiDev)
  14. find_library(PTHREAD_LIB pthread)
  15. find_library(RT_LIB rt)
  16. find_library(M_LIB m)
  17. find_library(CRYPT_LIB crypt)
  18. target_link_libraries(wiringpid
  19. ${WIRINGPI_LIB}
  20. ${WIRINGPIDEV_LIB}
  21. ${PTHREAD_LIB}
  22. ${RT_LIB}
  23. ${M_LIB}
  24. ${CRYPT_LIB}
  25. )
  26. # Install the executable
  27. install(TARGETS wiringpid
  28. RUNTIME DESTINATION bin
  29. )