Skip to content

Commit b836c03

Browse files
committed
fixed some missed items in the conversion
1 parent 5034d84 commit b836c03

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

targets/chip/rp2350/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ target_compile_options(target_cpu_options INTERFACE "-fno-asynchronous-unwind-ta
4040
# cpu rp2350 target drivers
4141
set(SOURCES
4242
${CMAKE_CURRENT_LIST_DIR}/../../arm/vector_table/cortex-m33.cpp
43-
${CMAKE_CURRENT_SOURCE_DIR}/metadata.cpp
43+
${CMAKE_CURRENT_LIST_DIR}/metadata.cpp
4444
)
4545

4646
set(HEADERS_PRIVATE

targets/chip/stm32f469/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# export our linkerscript
2-
set(TARGET_LINKERSCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/linkerscript.ld" PARENT_SCOPE)
2+
set_property(GLOBAL PROPERTY TARGET_LINKERSCRIPT "${CMAKE_CURRENT_LIST_DIR}/linkerscript.ld")
33

44
# set the stm32f469 cpu options as a seperate target so the driver layer can link agains klib
55
add_library(target_cpu_options INTERFACE)
@@ -9,7 +9,7 @@ set_target_properties(target_cpu_options PROPERTIES FOLDER "klib")
99
add_library(${PROJECT_NAME}::target_cpu_options ALIAS target_cpu_options)
1010

1111
# include the arm directory for all the cmsis files
12-
target_include_directories(target_cpu_options INTERFACE ${CMAKE_SOURCE_DIR}/targets/arm/)
12+
target_include_directories(target_cpu_options INTERFACE ${CMAKE_CURRENT_LIST_DIR}/../../arm/)
1313

1414
# set the cpu options for the compiler
1515
target_compile_options(target_cpu_options INTERFACE "-march=armv7e-m")
@@ -33,7 +33,7 @@ target_compile_options(target_cpu_options INTERFACE "-fno-asynchronous-unwind-ta
3333

3434
# cpu stm32f469 target drivers
3535
set(SOURCES
36-
${CMAKE_CURRENT_SOURCE_DIR}/../../arm/vector_table/cortex-m4.cpp
36+
${CMAKE_CURRENT_LIST_DIR}/../../arm/vector_table/cortex-m4.cpp
3737
)
3838

3939
set(HEADERS_PRIVATE
@@ -60,7 +60,7 @@ target_compile_features(target_cpu PUBLIC cxx_std_20)
6060

6161
# set the target_cpu for klib
6262
get_filename_component(TARGET_CPU_FOLDER ${CMAKE_CURRENT_LIST_DIR} NAME)
63-
set(TARGET_CPU ${TARGET_CPU_FOLDER} PARENT_SCOPE)
63+
set_property(GLOBAL PROPERTY TARGET_CPU ${TARGET_CPU_FOLDER})
6464
target_compile_definitions(target_cpu PUBLIC "TARGET_CPU=${TARGET_CPU}")
6565

6666
# add target specific compile options
@@ -76,7 +76,6 @@ target_link_libraries(target_cpu PUBLIC klib)
7676
# - header location in project: ${CMAKE_CURRENT_BINARY_DIR}/generated_headers
7777
target_include_directories(
7878
target_cpu PUBLIC
79-
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
80-
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
79+
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
8180
"$<BUILD_INTERFACE:${GENERATED_HEADERS_DIR}>"
8281
)

0 commit comments

Comments
 (0)