2013-05-07 1 views
0

ITK 내에서 Discrete Gaussian Image Filter을 사용하는 프로젝트를 진행하고 있습니다. 나는 CMake를 사용하여 빌드 프로세스를 자동화하고 있지만 CMake가 설정/생성 단계에서 특정 ITK 라이브러리를 빠뜨리고있는 것 같습니다. 현재 ITK 라이브러리에서 다른 헤더를 사용하고 있습니다. 프로젝트의 CMake에는 구성 오류 메시지가 없습니다.CMake 구성 중에 모든 ITK 라이브러리를 가져 오지 못함

내 프로젝트의 CMakeLists.txt :

#PROJECT(REGISTRATION) 
# 
# List of source files 
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) 

# Top of file: the name of the program 
PROJECT(MultiObjModelToUSReg) 
INCLUDE_REGULAR_EXPRESSION("^.*$") 

FIND_PACKAGE(ITK REQUIRED) 
IF(ITK_FOUND) 
    INCLUDE(${USE_ITK_FILE}) 
ENDIF(ITK_FOUND) 


# Directories to search for #include (add more if needed) 
# (ITK is already included through the use of INCLUDE(${ITK_USE_FILE}) 
INCLUDE_DIRECTORIES(
    ${CMAKE_CURRENT_SOURCE_DIR} 
    src 
) 

# Name of the executable 
#SET(MultiObjModelToUSReg MultiObjModelToUSReg_EXE) 

# All source files (only .cxx, not .h or .txx) 
SET(MultiObjModelToUSReg_SRCS 
    src/Utilities.cpp 
    src/MultiObjModel.cpp 
    src/USVolume.cpp 
    src/Registration.cpp 
    src/BoneProbabilityMap.cpp 
    #src/MultiObjModelToUSRegistration.cpp 
    #src/USRegistrationDialog.cpp 
    #src/MainPanel.cpp 
    #src/ModelRegistration.cxx 
) 

#only .h files that use QT_ macros! 
#SET(MultiObjModelToUSReg_HEADERS 
    #src/USRegistrationDialog.h 
    #src/MainPanel.h 
    #src/ModelRegistration.h) 

#SET(MultiObjModelToUSReg_FORMS 
    ##ui/USRegistrationDialog.ui 
    ##ui/MainPanel.ui 
    #ui/ModelRegistration.ui) 

#SET(MultiObjModelToUSReg_RESOURCES) 


# These two lines will compile and link your executable 
#ADD_EXECUTABLE(MultiObjModelToUSReg 
    #${MultiObjModelToUSReg_EXE} 
    #${MultiObjModelToUSReg_SRCS} 
    #${MultiObjModelToUSReg_HEADERS_MOC} 
     #${MultiObjModelToUSReg_FORMS_HEADERS} 
     #${MultiObjModelToUSReg_RESOURCES_RCC} 
     #) 



ADD_LIBRARY(MultiObjModelToUSReg STATIC ${MultiObjModelToUSReg_SRCS}) 
TARGET_LINK_LIBRARIES(MultiObjModelToUSReg ${ITK_LIBRARIES}) 
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) 

ENABLE_TESTING() 

INCLUDE(CTEST) 
IF (BUILD_TESTING) 
    ADD_SUBDIRECTORY (Test) 
ENDIF (BUILD_TESTING) 

CMake의 오류가없는 출력 : 그러나

Check for working C compiler using: Visual Studio 9 2008 
Check for working C compiler using: Visual Studio 9 2008 -- works 
Detecting C compiler ABI info 
Detecting C compiler ABI info - done 
Check for working CXX compiler using: Visual Studio 9 2008 
Check for working CXX compiler using: Visual Studio 9 2008 -- works 
Detecting CXX compiler ABI info 
Detecting CXX compiler ABI info - done 
Configuring done 
Generating done 

, 나는 ++ 2008 비주얼 C에서 컴파일 :

1>------ Build started: Project: MultiObjModelToUSReg, Configuration: Debug Win32 ------ 
1>Compiling... 
1>BoneProbabilityMap.cpp 
1>..\src\BoneProbabilityMap.cpp(8) : fatal error C1083: Cannot open include file: 'itkDiscreteGaussianImageFilter.h': No such file or directory 
1>Build log was saved at "file://c:\MultiObjModelToUSReg\bin\MultiObjModelToUSReg.dir\Debug\BuildLog.htm" 
1>MultiObjModelToUSReg - 1 error(s), 0 warning(s) 
2>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------ 
2>Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 1 failed, 12 up-to-date, 1 skipped ========== 

동안 거기에 수동으로 프로젝트의 구성에 해결 방법이있다, 나는 다른 사람들과 협력해야하므로 b e는 빌드 프로세스를 자동화하는 데 이상적입니다.

도움이 될 것입니다. (나는 Stackoverflow에 아주 새로운 것이고, 내가 불분명 한 것을 만들었다면 알려주 길 바란다.)

+0

여기 이전 문제를 해결 했습니까? http://stackoverflow.com/q/16429640/2065121? –

+0

@RogerRowland 아니, 해결할 수 없었습니다. 나는이 문제가 작동하지 않는 핵심 부분에 더 있다고 생각한다. – poliu2s

+0

ITK_BUILD_ALL_MODULES = ON으로 ITK를 구축 했습니까? –

답변

1

ITK_BUILD_ALL_MODULES = ON으로 ITK를 빌드해야합니다.