Text archives Help
- From: "James Bigler" <
>
- Cc:
- Subject: [Manta] Re: Make install
- Date: Thu, 5 Jun 2008 22:08:36 -0600
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=CS6zS3InuchqUL38li0OMLnZRynNAkriHkX1j55F96F8YjCr3/nqUpfiREN4PNZtOF gkvq8EfTLnCVyLjCTcWLiYwjVJJIkBKwGBQJHC1f53vMojDMoePVrtgACvPoD3w6ZTE6 dHVhZereTv3XShAPcv1C00wL86Xxk2K+gZdTo=
1. Look at the logic of your macro:
# install for .h files
MACRO(InstallHeaders sources)
SET(__files.h)
FOREACH(__file ${ARGV})
GET_FILENAME_COMPONENT(__fname ${__file} ABSOLUTE)
GET_FILENAME_COMPONENT(__fname.path ${__fname} PATH)
GET_FILENAME_COMPONENT(__fname.name ${__fname} NAME_WE)
# IF ( EXISTS "${__fname.path}/${__fname.name}.h" )
# Right here you are asking if ${__fname.name}.h exists. The
problem is that this will be true for both file.cc and file.h,
# because you stripped the extension off. You need a better
check to see if it is a header file or not (if this is in fact
# what you are trying to test):
IF ( ${__fname} STREQUAL ${__fname.name}.h )
STRING(REPLACE "${CMAKE_SOURCE_DIR}/" "" __rel.path ${__fname.path})
SET(__files.h "${__fname.path}/${__fname.name}.h")
INSTALL(FILES ${__files.h} DESTINATION include/${__rel.path})
ENDIF ( EXISTS "${__fname.path}/${__fname.name}.h" )
ENDFOREACH(__file)
ENDMACRO(InstallHeaders)
2. You need to be more specific as to what files are extra.
James
On Thu, Jun 5, 2008 at 1:37 PM, Li-Ta Lo
<
>
wrote:
>
Hi,
>
>
Since I am trying to embedding Manta into VTK, it is much more
>
convenient for me if Manta is "installed" at some place. Here
>
is a patch to the CMakeLists.txt files that kind of doing this.
>
There are two problems left, 1. it install each .h files twice,
>
2. it install more files than it should in the include directory.
>
>
Any ideas?
>
>
Ollie
>
>
Archive powered by MHonArc 2.6.16.