2009/3/10 Sharon Melamed <shar...@voltaire.com>

>  Hi,
>
>
>
> My main CmakeList.txt file look like this:
>
>
>
> cmake_minimum_required (VERSION 2.6)
>
> project (vos)
>

Same thing happens to me also. The problem is of RPATH settings. the path
your cmakelist links to while installing is not set for the sub directories
when you try to build and install it from your main directory "vos".
Therefore you need to do the following:

# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH  FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

# the RPATH to be used when installing
SET(CMAKE_INSTALL_RPATH "/bin")

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

after doing this once when you do make install it will work and install the
exeutabled in /bin.
No need to set all this variables in the sub directory. it is valid for all
sub dirs.

For further inf. on RAPTH refer this link:
http://www.cmake.org/Wiki/CMake_RPATH_handling

It provide all details pertainign to RPATH settings.

Hope all this will work for you.

Ankit




>
>
> add_subdirectory (system  BUILD)
>
> add_subdirectory (osal BUILD)
>
> add_subdirectory (logger BUILD)
>
> add_subdirectory (loggerConfigTool BUILD)
>
> add_subdirectory (voltSyslogd BUILD)
>
> add_subdirectory (chassis BUILD)
>
> add_subdirectory (eventHandler BUILD)
>
>
>
> in the system subdirectory the CmakeList.txt file look like this:
>
>
>
> set(main_SRCS main.cpp)
>
>
>
> include_directories(${vos_SOURCE_DIR}/include)
>
> link_directories(${vos_SOURCE_DIR}/BUILD)
>
>
>
> add_executable(vos ${main_SRCS})
>
>
>
> target_link_libraries(vos rt pthread logger osal)
>
> install(TARGETS vos RUNTIME DESTINATION /bin )
>
>
>
> After running cmake the make install command builds the vos executable but
> does not install it.
>
> I looked in install_manifest.txt and it was empty.
>
>
>
> Any ideas what I’m doing wrong?
>
>
>
> Thanks.
>
>
>
> Sharon.
>
> _______________________________________________
> 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
>
_______________________________________________
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