Skip to content

Commit

Permalink
Fixed install files for ATSAM MCUs
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Jun 19, 2024
1 parent e228d47 commit 0259000
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions ARM/gcc_clang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit 0259000

Please sign in to comment.