- Timestamp:
- Feb 28, 2019, 3:42:07 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 2 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 -
trunk/tools/FlairGCS/CMakeLists.txt
r302 r305 72 72 ) 73 73 74 ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SOURCE_FILES} ${MOC_SOURCES} ${RCC_SOURCES}) 74 SET(SRC_FILES ${PROJECT_SOURCE_FILES} ${MOC_SOURCES} ${RCC_SOURCES}) 75 FLAIR_NRT_TOOL(${PROJECT_NAME} "${SRC_FILES}" COPY_RESOURCES) 75 76 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} GL qwt QwtDataViewer udt QtLocation FileLib z) 76 77 77 INSTALL(78 TARGETS ${PROJECT_NAME}79 RUNTIME DESTINATION $ENV{FLAIR_ROOT}/flair-install/bin/tools/${ARCH_DIR}80 )81 78 82 79 add_custom_target( … … 87 84 add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_compile_info) 88 85 89 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)90 91 86 else() 92 87 warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
Note:
See TracChangeset
for help on using the changeset viewer.