Dear all,

I would like to ask, if CMake supports something like "conditional" 
installation.
My CMakeLists.txt includes the following:

# The source files of the application (binary)
add_directory(src)

# The subdirectories with the required libraries. They are included
# through svn:externals
# They contain their own INSTALL( TARGETS .... )
add_directory(src_lib1)
add_directory(src_lib2)


When 'make' is called, both libraries are built and then STATICALLY linked
to the application - works perfectly.

However, when 'make install' is called, the libraries are installed as
well (right, they contain INSTALL() definition ...)

What I need is to tell to CMake NOT to install the libraries (they are

separate projects and it is not necessary to publish them together with
the binary). I mean something like EXCLUDE_FROM_ALL but in form of
EXCLUDE_FROM_INSTALL :-)

Is there a simple way, how to tell to CMake not to call INSTALL from
given directory? Without affecting the CMakeLists.txt of the libraries?
Like:

add_directory(src)

if (NOT install)
  add_directory(src_lib1)
  add_directory(src_lib2)
endif()

Thank you very much,
D.T.



P.S. I use cmake version 2.6-patch 2



-- 
Vyzkoušejte nový antivirus Kaspersky Internet Security 2010. Nejspolehlivější
ochrana před všemi druhy on-line zločinů již za 940 Kč. www.kaspersky.cz

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to