diff --git a/CMakeLists.txt b/CMakeLists.txt index eabe543..91f75a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,22 +47,22 @@ function(setup_target TARGET) add_executable(${TARGET}) target_sources(${TARGET} PRIVATE - port/picolibc/port.c - port/moonlight/bootup.c - port/moonlight/board.c - port/moonlight/trap_non_vectored.c - port/moonlight/exception.c - port/moonlight/vector_table.c + ${CMAKE_SOURCE_DIR}/port/picolibc/port.c + ${CMAKE_SOURCE_DIR}/port/moonlight/bootup.c + ${CMAKE_SOURCE_DIR}/port/moonlight/board.c + ${CMAKE_SOURCE_DIR}/port/moonlight/trap_non_vectored.c + ${CMAKE_SOURCE_DIR}/port/moonlight/exception.c + ${CMAKE_SOURCE_DIR}/port/moonlight/vector_table.c ) if("netxduo" IN_LIST ST_LIBRARIES) - target_sources(${TARGET} PRIVATE port/moonlight/mnrs_network_driver.c) + target_sources(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR}/port/moonlight/mnrs_network_driver.c) endif() if(ST_SOURCES) target_sources(${TARGET} PRIVATE ${ST_SOURCES}) endif() - target_include_directories(${TARGET} PRIVATE port/moonlight src) + target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR}/port/moonlight ${CMAKE_SOURCE_DIR}/src) target_compile_options(${TARGET} PRIVATE -ffreestanding -fno-builtin @@ -72,7 +72,7 @@ function(setup_target TARGET) if(NX_DEBUG) target_compile_definitions(${TARGET} PRIVATE NX_DEBUG NX_DEBUG_PACKET) endif() - target_link_directories(${TARGET} PRIVATE src) # needed for linker script includes + target_link_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR}/src) # needed for linker script includes target_link_options(${TARGET} PRIVATE -nostartfiles -nostdlib