summaryrefslogtreecommitdiff
path: root/examples/usercmodule/cexample/micropython.cmake
blob: ba076a16b246bc7ee79490017c52355ee9775e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Create an INTERFACE library for our C module.
add_library(usermod_cexample INTERFACE)

# Add our source files to the lib
target_sources(usermod_cexample INTERFACE
    ${CMAKE_CURRENT_LIST_DIR}/examplemodule.c
)

# Add the current directory as an include directory.
target_include_directories(usermod_cexample INTERFACE
    ${CMAKE_CURRENT_LIST_DIR}
)

# Link our INTERFACE library to the usermod target.
target_link_libraries(usermod INTERFACE usermod_cexample)