|
@@ -20,12 +20,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") |
|
|
# Add the executable target |
|
|
# Add the executable target |
|
|
add_executable(gpio ${SRC}) |
|
|
add_executable(gpio ${SRC}) |
|
|
|
|
|
|
|
|
# Find the required libraries |
|
|
|
|
|
find_library(WIRINGPI_LIB wiringPi) |
|
|
|
|
|
find_library(WIRINGPI_DEV_LIB wiringPiDev) |
|
|
|
|
|
|
|
|
|
|
|
# Link the required libraries |
|
|
# Link the required libraries |
|
|
target_link_libraries(gpio ${WIRINGPI_LIB} ${WIRINGPI_DEV_LIB} Threads::Threads m PkgConfig::libcrypt) |
|
|
|
|
|
|
|
|
target_link_libraries(gpio wiringPi wiringPiDev Threads::Threads m PkgConfig::libcrypt) |
|
|
|
|
|
|
|
|
# Install the executable |
|
|
# Install the executable |
|
|
install(TARGETS gpio DESTINATION bin) |
|
|
install(TARGETS gpio DESTINATION bin) |
|
|