Changeset 97 in flair-dev
- Timestamp:
- Jan 30, 2019, 3:06:32 PM (6 years ago)
- Location:
- trunk/cmake-modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cmake-modules/FlairUseFile.cmake
r83 r97 1 if(DEFINED FLAIRUSEFILE_INCLUDED) 2 return() 3 endif() 4 5 SET(FLAIRUSEFILE_INCLUDED true) 6 1 7 find_package(LibXml2 REQUIRED) 2 8 find_package(Xenomai QUIET) … … 20 26 21 27 #check if we have a flair-hds directory 22 if (IS_DIRECTORY $ENV{FLAIR_ROOT}/flair-hds ) 23 message("found flair-hds directory") 24 SET(FOUND_HDS_DIR TRUE) 25 SET(FLAIRHDS_LIBRARY_DIR 28 if (DEFINED FOUND_HDS_DIR) 29 SET(FLAIRHDS_LIBRARY_DIR 26 30 $ENV{FLAIR_ROOT}/flair-hds/bin/lib/${ARCH_DIR} 27 31 ) … … 63 67 IF (FLAIR_USE_VISION_FILTER) 64 68 if(FOUND_HDS_DIR AND ("${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE}" MATCHES "armv7a-neon" OR "${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE}" MATCHES "core2-64")) 65 message( "using libdspcv_gpp.a for vision filter")69 message(${PROJECT_NAME} ": using libdspcv_gpp.a for vision filter") 66 70 SET(FLAIR_INCLUDE_DIR ${FLAIR_INCLUDE_DIR} $ENV{FLAIR_ROOT}/flair-hds/dev/include/VisionFilter) 67 71 SET(FLAIR_LIBRARIES ${FLAIRHDS_LIBRARY_DIR}/libVisionFilter.a ${FLAIRHDS_LIBRARY_DIR}/libdspcv_gpp.a ${FLAIR_LIBRARIES}) -
trunk/cmake-modules/GlobalCmakeFlair.cmake
r81 r97 1 if(DEFINED GLOBALCMAKEFLAIR_INCLUDED) 2 return() 3 endif() 4 5 SET(GLOBALCMAKEFLAIR_INCLUDED true) 6 7 include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/ColoredMessage.cmake) 8 9 #check if we have a flair-hds directory 10 if (IS_DIRECTORY $ENV{FLAIR_ROOT}/flair-hds ) 11 info("found flair-hds directory") 12 SET(FOUND_HDS_DIR TRUE) 13 endif() 14 1 15 if(NOT DEFINED ENV{FLAIR_ROOT}) 2 16 message(FATAL_ERROR "variable FLAIR_ROOT not defined") 3 17 endif() 4 5 include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/ColoredMessage.cmake)6 18 7 19 if(NOT DEFINED ENV{FLAIR_ROOT}) … … 57 69 #reimplement add executable to add a custom target for delivery (only on ARM) 58 70 #delivery are read from ssh config file 71 #also add a message to display architecture 59 72 function(ADD_EXECUTABLE) 60 73 if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm" AND EXISTS "$ENV{HOME}/.ssh/config") … … 69 82 if(${POS} GREATER -1) 70 83 string(FIND ${f} "192.168." POS)#cherche addresse 71 if(${POS} GREATER 0)#garde que les adresses en 192.168. 6.x84 if(${POS} GREATER 0)#garde que les adresses en 192.168.x.x 72 85 string(REPLACE HostName "" ADDRESS ${f})#enleve Hostname 73 86 string(STRIP ${ADDRESS} ADDRESS)#enleve les espaces 74 message("adding delivery target for " ${ARGV0} " (" ${ADDRESS} ")")87 #message("adding delivery target for " ${ARGV0} " (" ${ADDRESS} ")") 75 88 string(REPLACE "/" "_" TARGET_PATH ${TARGET_EXECUTABLE_OUTPUT_PATH})#les / ne sont pas acceptés 76 89 add_custom_target( … … 83 96 endforeach(f) 84 97 endif() 85 #call original function 98 99 #call original function 86 100 _ADD_EXECUTABLE(${ARGV}) 101 102 #add a message to display architecture 103 string(SUBSTRING ${ARGV0} 0 5 TESTNAME) #check if it is qt4 internal target 104 if(NOT ${TESTNAME} MATCHES "Qt4::") 105 add_custom_command(TARGET ${ARGV0} POST_BUILD 106 COMMENT "${ARGV0} built for ${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE} architecture") 107 endif() 108 109 #add a dependance to FlairLibs and FlairHdsLibs if we use the top level CMakeLists.txt and we need flairlibs 110 if(TARGET FlairLibs AND DEFINED FLAIRUSEFILE_INCLUDED) 111 add_dependencies(${ARGV0} FlairLibs) 112 endif() 113 if(TARGET FlairHdsLibs AND DEFINED FLAIRUSEFILE_INCLUDED) 114 add_dependencies(${ARGV0} FlairHdsLibs) 115 endif() 87 116 endfunction() 117 118 119 #reimplement add library to add a message to display architecture 120 function(ADD_LIBRARY) 121 #call original function 122 _ADD_LIBRARY(${ARGV}) 123 string(SUBSTRING ${ARGV0} 0 5 TESTNAME) #check if it is qt4 internal target 124 if(NOT ${TESTNAME} MATCHES "Qt4::") 125 add_custom_command(TARGET ${ARGV0} POST_BUILD 126 COMMENT "${ARGV0} built for ${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE} architecture") 127 endif() 128 endfunction()
Note:
See TracChangeset
for help on using the changeset viewer.