cmake improved
This commit is contained in:
parent
91e1a7d424
commit
d6d91f4cb2
1 changed files with 10 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
configure_file(config.h.in ${PROJECT_BINARY_DIR}/src/config.h)
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.in ${PROJECT_BINARY_DIR}/src/config.h)
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
gbmanager.cpp
|
gbmanager.cpp
|
||||||
|
@ -8,24 +8,24 @@ set(SOURCES
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add executable. Default name is the project name, version 0.1
|
# Add executable. Default name is the project name, version 0.1
|
||||||
add_executable(gbmanager ${SOURCES})
|
add_executable(${CMAKE_PROJECT_NAME} ${SOURCES})
|
||||||
|
|
||||||
pico_set_program_name(gbmanager "gbmanager")
|
pico_set_program_name(${CMAKE_PROJECT_NAME} "gbmanager")
|
||||||
pico_set_program_version(gbmanager ${PROJECT_VERSION})
|
pico_set_program_version(${CMAKE_PROJECT_NAME} ${PROJECT_VERSION})
|
||||||
|
|
||||||
pico_enable_stdio_uart(gbmanager 1)
|
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1)
|
||||||
pico_enable_stdio_usb(gbmanager 0)
|
pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0)
|
||||||
|
|
||||||
pico_generate_pio_header(gbmanager ${CMAKE_CURRENT_LIST_DIR}/ds18b20.pio)
|
pico_generate_pio_header(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ds18b20.pio)
|
||||||
|
|
||||||
# Add the standard library to the build
|
# Add the standard library to the build
|
||||||
target_link_libraries(gbmanager pico_stdlib)
|
target_link_libraries(${CMAKE_PROJECT_NAME} pico_stdlib)
|
||||||
|
|
||||||
# Add any user requested libraries
|
# Add any user requested libraries
|
||||||
target_link_libraries(gbmanager
|
target_link_libraries(${CMAKE_PROJECT_NAME}
|
||||||
hardware_i2c
|
hardware_i2c
|
||||||
hardware_gpio
|
hardware_gpio
|
||||||
hardware_pio
|
hardware_pio
|
||||||
)
|
)
|
||||||
|
|
||||||
pico_add_extra_outputs(gbmanager)
|
pico_add_extra_outputs(${CMAKE_PROJECT_NAME})
|
||||||
|
|
Loading…
Reference in a new issue