Files
SOEM/cmake/Linux.cmake
Hans-Erik Floryd 08064ae3fa Add more samples
Change-Id: I6bf219887efd88a69a257815f1974759d56fd3c3
2025-07-09 17:21:26 +02:00

45 lines
906 B
CMake

# Licensed under the GNU General Public License version 2 with exceptions. See
# LICENSE file in the project root for full license information
target_sources(soem PRIVATE
osal/linux/osal.c
osal/linux/osal_defs.h
oshw/linux/oshw.c
oshw/linux/oshw.h
oshw/linux/nicdrv.c
oshw/linux/nicdrv.h
)
target_include_directories(soem PUBLIC
$<BUILD_INTERFACE:${SOEM_SOURCE_DIR}/osal/linux>
$<BUILD_INTERFACE:${SOEM_SOURCE_DIR}/oshw/linux>
$<INSTALL_INTERFACE:include/soem>
)
foreach(target IN ITEMS
soem
coetest
eepromtool
eni_test
eoe_test
firm_update
red_test
simple_ng
simple_test
slaveinfo)
if (TARGET ${target})
target_compile_options(${target} PRIVATE
-Wall
-Wextra
)
endif()
endforeach()
target_link_libraries(soem PUBLIC pthread rt)
install(FILES
osal/linux/osal_defs.h
oshw/linux/nicdrv.h
DESTINATION include/soem
)