From 0259000008398e9a1cb8568976b35f8121edb54a Mon Sep 17 00:00:00 2001 From: strahi-linux Date: Wed, 19 Jun 2024 12:01:41 +0200 Subject: [PATCH] Fixed install files for ATSAM MCUs --- ARM/gcc_clang/CMakeLists.txt | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/ARM/gcc_clang/CMakeLists.txt b/ARM/gcc_clang/CMakeLists.txt index 8267b233b..195d3716d 100644 --- a/ARM/gcc_clang/CMakeLists.txt +++ b/ARM/gcc_clang/CMakeLists.txt @@ -109,26 +109,35 @@ install( ${CMAKE_INSTALL_PREFIX}/../FileLinker ) +# NOTE - Backslash at the end is important for DIRECTORY path install( - DIRECTORY "common/cmsis/" - DESTINATION "${CMAKE_INSTALL_PREFIX}/include/core/common/cmsis" + DIRECTORY + ${CMAKE_CURRENT_LIST_DIR}/common/cmsis/ + DESTINATION + ${CMAKE_INSTALL_PREFIX}/include/core/common/cmsis FILES_MATCHING PATTERN "*.h" ) +# NOTE - Backslash at the end is important for DIRECTORY path get_mcu_vendor(vendor) install( - DIRECTORY "def/${vendor}/${MCU_NAME}/" - DESTINATION "${CMAKE_INSTALL_PREFIX}/include/core/${MCU_NAME}" + DIRECTORY + ${CMAKE_CURRENT_LIST_DIR}/def/${vendor}/${MCU_NAME}/ + DESTINATION + ${CMAKE_INSTALL_PREFIX}/include/core/${MCU_NAME} FILES_MATCHING PATTERN "*.h" ) +# NOTE - Backslash at the end is important for DIRECTORY path if(thirdpartyInstall) - if(IS_DIRECTORY "system/src/${vendor}/${thirdpartyInstall}") + if(IS_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/system/src/${vendor}/${thirdpartyInstall}) install( - DIRECTORY "system/src/${vendor}/${thirdpartyInstall}/" - DESTINATION "${CMAKE_INSTALL_PREFIX}/include/core/${MCU_NAME}" + DIRECTORY + ${CMAKE_CURRENT_LIST_DIR}/system/src/${vendor}/${thirdpartyInstall}/ + DESTINATION + ${CMAKE_INSTALL_PREFIX}/include/core/${MCU_NAME} FILES_MATCHING PATTERN "*.h" )