1、CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8 FATAL_ERROR) 2 project(testfilter) 3 set(ITK_DIR D:/ProgramFiles/ITK5.2/lib/cmake/ITK5.2) 4 5 FIND_PACKAGE(ITK REQUIRED) 6 INCLUDE($) 7 8 file(GLOB_RECURSE mains $ *pp) 9 message(STATUS $) 10 foreach(mainfile IN LISTS mains) 11 # Get file name without directory 12 get_filename_cponent(mainname $ NAME_WE) 13 add_executable($ $) 14 target_link_libraries ($ $) 15 endforeach()2、get_filename_cponent 用法
get_filename_cponent1 DIRECTORY = Directory without file name 2 NAME = File name without directory 3 EXT = File name longest extension (.b fr d/a.b) 4 NAME_WE = File name with neither the directory nor the longest extension 5 LAST_EXT = File name last extension ( fr d/a.b) 6 NAME_WLE = File name with neither the directory nor the last extension 7 PATH = Legacy alias for DIRECTORY (use for CMake <= 2.8.11)
上一篇:3D Slicer 设置中文界面
下一篇:SimpleITK 读取医学影像文件
ITK









