Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] Re: Re: Make install


Chronological Thread 
  • From: Li-Ta Lo < >
  • To:
  • Subject: [Manta] Re: Re: Make install
  • Date: Fri, 06 Jun 2008 11:31:59 -0600
  • Organization: Los Alamos National Lab


On Thu, 2008-06-05 at 22:08 -0600, James Bigler wrote:
> 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)
> 

Thanks a lot. I am trying it now.

> 2. You need to be more specific as to what files are extra.
> 

I use the INSTALL(DIRECTORY ...) to install the include directory. I
can't find a regex/pattern to not install files like CMakeFiles and
cmake_install.cmake.

Ollie





Archive powered by MHonArc 2.6.16.

Top of page