[Insight-developers] Finding include and lib directories
Luis Ibanez
ibanez@cs.unc.edu
Mon, 19 Feb 2001 17:36:14 -0500
Hi Paul,
It seems it is not necesary to modify all the
CMakeList.txt files to make them work for Linux.
You only need to define the environment variables:
THREADS_LIBS as -lpthread
and
DL_LIBS as -ldl
CMake recursively access the CMakeList.txt files in the
parent directories.
The one at the root (Insight) already contains the lines:
UNIX_LIBRARIES(
${THREAD_LIBS}
${DL_LIBS}
-lm
}
The includes directories are also set in this unique file under:
INCLUDE_DIRECTORIES(
...
)
---
Using directly the names of the libraries in each CMakeList.txt
will not work well because libraries like -ldl doesn't exist on Windows.
(Right now the CMakeList.txt files doesn't work on Windows)
---
It could be useful to add in the InsightStart.doc the list of
environment variables that should be set on Unix before
running configure.... including a mention to setenv CC=gcc :-)
Thanks,
Luis
---
Paul Hughett wrote:
> I have now modified most of the CMakeLists.txt files to define the
> necessary directories to search for missing include and lib files, at
> least on the gcc/linux platform. The Testing/Code/Algorithms,
> Code/Algorithms, and Examples directories remain to be done, and
> appear to have worse problems than just missing include and lib files.
> I make no guarantees that these changes will not break other platforms.
>
> Paul Hughett
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
--
______________________________________________________________________
Luis Ibanez
Research Assistant Professor - Division of Neurosurgery
University of North Carolina at Chapel Hill
CB# 7060, Chapel Hill, NC 27599
email : ibanez@cs.unc.edu home : http://www.cs.unc.edu/~ibanez
phone : (919)-843-9961 fax : (919)-966-6627
______________________________________________________________________