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.
21 lines
472 B
21 lines
472 B
cmake_minimum_required(VERSION 3.23)
|
|
project(modbus C)
|
|
|
|
set(CMAKE_C_STANDARD 99)
|
|
|
|
add_executable(modbus
|
|
src/pp/payload_builder.c
|
|
src/pp/payload_parser.c
|
|
src/modbus.c
|
|
src/main.c
|
|
src/stcpsc.c
|
|
src/hexdump.c
|
|
src/hexdump.h
|
|
src/parsehex.c
|
|
src/parsehex.h)
|
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
find_package(Threads REQUIRED)
|
|
target_link_libraries(modbus PRIVATE Threads::Threads)
|
|
|
|
target_include_directories(modbus PRIVATE src)
|
|
|