[Insight-developers] Compilation problem.
Mark Foskey
mark_foskey@unc.edu
Wed, 16 Oct 2002 13:25:22 -0400
I am trying to compile a simple project inside the itk tree. It is
intended as a example program that will also compile outside itk, but
for now I'm just trying to make it compile inside the tree.
Here is my CMakeLists.txt file:
PROJECT(BasicIOAndFilter)
# Find ITK
INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
IF (USE_ITK_FILE)
INCLUDE (${USE_ITK_FILE})
ENDIF (USE_ITK_FILE)
#indicate directores and libraries
LINK_LIBRARIES (
${ITK_Common_LIBS}
${ITK_BasicFilters_LIBS}
${ITK_Numerics_LIBS}
${ITK_Algorithms_LIBS}
${ITK_IO_LIBS}
)
SET(BasicIOAndFilter_SRCS
BasicIOAndFilter.cxx
)
#specify executables
ADD_EXECUTABLE(BasicIOAndFilter ${BasicIOAndFilter_SRCS})
Here is the resulting link line:
c++ -rdynamic -g -ftemplate-depth-50 BasicIOAndFilter.o
-L/WorkSpace/foskey/Insight-Linux/bin -lpthread -ldl -lITKAlgorithms
-lVXLNumerics -lITKCommon -lITKBasicFilters -lm -lITKNumerics
-lITKCommon -lVXLNumerics -lm -lpthread -ldl
-Wl,-rpath,/WorkSpace/foskey/Insight-Linux/bin -o
/WorkSpace/foskey/Insight-Linux/bin/BasicIOAndFilter
There is no -lITKIO, and errors result.
It compiled yesterday, and I would have done a commit, but I had a
meeting. Now, after an update, it doesn't.
Any ideas what the problem could be?
Also, I'd like any feedback on my CMakeLists.txt style. Am I doing it
the Right Way? (And, if so, would you like for me to revise the
SampleProject CMakeLists.txt file to match?)
--
Mark Foskey (919) 843-5436 Computer-Aided Diagnosis and Display Lab
mark_foskey@unc.edu Department of Radiology, CB 7515, UNC
http://www.cs.unc.edu/~foskey Chapel Hill, NC 27599-7515