Changeset 305 in flair-src for trunk/cmake-modules
- Timestamp:
- Feb 28, 2019, 3:42:07 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cmake-modules/GlobalCmakeFlair.cmake
r302 r305 155 155 156 156 function(FLAIR_NRT_TOOL PROJECT_NAME SRC_FILES) 157 set(options COPY_RESOURCES) 158 set(oneValueArgs "")#not used 159 set(multiValueArgs "")#not used 160 cmake_parse_arguments(PARSE_ARGV 2 TOOL "${options}" "${oneValueArgs}" "${multiValueArgs}") 161 162 if(DEFINED TOOL_UNPARSED_ARGUMENTS) 163 warn("FLAIR_NRT_TOOL function: unparsed arguments (${TOOL_UNPARSED_ARGUMENTS})") 164 endif() 165 157 166 #get ${FLAIR_INCLUDE_DIR}, ${FLAIR_LIBRARIES_RT} and ${FLAIR_LIBRARIES_NRT} 158 167 include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/FlairUseFile.cmake) … … 173 182 RUNTIME DESTINATION $ENV{FLAIR_ROOT}/flair-install/bin/tools/${ARCH_DIR}/ 174 183 ) 184 185 #copy resources if needed 186 if(${TOOL_COPY_RESOURCES}) 187 FILE(GLOB RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/${ARCH_DIR}/*") 188 foreach(item IN LISTS RESOURCE_FILES) 189 get_filename_component(filename ${item} NAME) 190 #do not overwrite: user can change xml or scripts 191 INSTALL(CODE " 192 if (NOT EXISTS \"$ENV{FLAIR_ROOT}/flair-install/bin/tools/${ARCH_DIR}/${filename}\") 193 file(INSTALL \"${item}\" DESTINATION \"$ENV{FLAIR_ROOT}/flair-install/bin/tools/${ARCH_DIR}\" USE_SOURCE_PERMISSIONS) 194 else() 195 message(\"-- Not installing \" $ENV{FLAIR_ROOT} \"/flair-install/bin/tools/\" ${ARCH_DIR} \"/\" ${filename} \" (file already exists)\") 196 endif() 197 ") 198 endforeach() 199 endif() 200 175 201 endfunction() 176 202
Note:
See TracChangeset
for help on using the changeset viewer.