Changeset 102 in flair-dev for trunk


Ignore:
Timestamp:
Feb 7, 2019, 4:27:03 PM (6 years ago)
Author:
Sanahuja Guillaume
Message:

modifs for demos resources

Location:
trunk/cmake-modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmake-modules/ArchDir.cmake

    r68 r102  
    33endif()
    44
    5 if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
    6     SET(ARCH_DIR "x86_64/unix")
    7 elseif(DEFINED CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE)
     5if(DEFINED CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE)
    86    SET(ARCH_DIR ${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE})
    97else()
  • trunk/cmake-modules/GlobalCmakeFlair.cmake

    r97 r102  
    127127    endif()
    128128endfunction()
     129
     130#copy resources (ex: demos scripts and xml)
     131function(INSTALL)
     132    if(COPY_RESOURCE_FILES)
     133        FILE(GLOB RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/${ARCH_DIR}/*")
     134        foreach(item IN LISTS RESOURCE_FILES)
     135            get_filename_component(filename ${item} NAME)
     136            #do not overwrite: user can change xml or scripts
     137            _INSTALL(CODE "
     138                if (NOT EXISTS \"$ENV{FLAIR_ROOT}/flair-bin/demos/${ARCH_DIR}/${PROJECT_NAME}/${filename}\")
     139                    file(INSTALL \"${item}\" DESTINATION \"$ENV{FLAIR_ROOT}/flair-bin/demos/${ARCH_DIR}/${PROJECT_NAME}\")
     140                endif()
     141            ")
     142        endforeach()
     143
     144    endif()
     145    #call original function
     146        _INSTALL(${ARGV})
     147endfunction()
Note: See TracChangeset for help on using the changeset viewer.