it's working fine. I have moved SET(CMAKE_INSTALL_PREFIX "$ENV{DESTDIRPREFIX}") to the root CMakeLists.txt
(<lib_dir>- CMakelists.txt |--static |-- CMakeLists.txt |--shared |-- CMakeLists.txt if SET(CMAKE_INSTALL_PREFIX "$ENV{DESTDIRPREFIX}") is in the shared/CMakelists.txt the installation process failed (the CMAKE_INSTALL_PREFIX is ignored). whereas if SET(CMAKE_INSTALL_PREFIX "$ENV{DESTDIRPREFIX}") is in the <lib_dir>/CMakeLists.txt it's OK. On Thu, 5 Oct 2006 10:35:43 +0200 Xavier Delannoy <[EMAIL PROTECTED]> wrote: > hi, > > I use CMake 2.4.1 under FreeBSD6.1. > > in my CMakeLists.txt (for a shared library) I have : > > SET(CMAKE_INSTALL_PREFIX "$ENV{DESTDIRPREFIX}") > MESSAGE(STATUS "CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}") > INSTALL(TARGETS nbase_shared DESTINATION /usr/Firewall/lib) > > ... > > > during CMake execution : > build Makefile for lib/libnbase > -- Check for working C compiler: gcc > -- Check for working C compiler: gcc -- works > -- Check size of void* > -- Check size of void* - done > -- libnbase > -- CMAKE_INSTALL_PREFIX /home/xavierd/tempbuild/firmware/tmp/bin.FW-M-INTERNE > -- Configuring done > > CMAKE_INSTALL_PREFIX is OK, but during the installation process I have : > Install the project... > /home/xavierd/tempbuild/firmware/contrib/cmake/work/cmake-2.4.1/bin/cmake -P > cmake_install.cmake > -- Install configuration: "Release" > CMake Error: Error in cmake code at > /home/xavierd/tempbuild/firmware/lib/libnbase/shared/cmake_install.cmake:30: > FILE cannot create directory: /usr/Firewall/lib. Maybe need administrative > privileges. > *** Error code 255 > > here is my cmake_install.cmake > # Install script for directory: > /home/xavierd/tempbuild/firmware/lib/libnbase/sh > ared > > # Set the install prefix > IF(NOT DEFINED CMAKE_INSTALL_PREFIX) > SET(CMAKE_INSTALL_PREFIX > "/home/xavierd/tempbuild/firmware/tmp/bin.FW-M-INTERN > E") > ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) > STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") > > # Set the install configuration name. > IF(NOT CMAKE_INSTALL_CONFIG_NAME) > IF(BUILD_TYPE) > STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" > CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") > ELSE(BUILD_TYPE) > SET(CMAKE_INSTALL_CONFIG_NAME Release) > ENDIF(BUILD_TYPE) > MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") > ENDIF(NOT CMAKE_INSTALL_CONFIG_NAME) > > # Set the component getting installed. > IF(NOT CMAKE_INSTALL_COMPONENT) > IF(COMPONENT) > MESSAGE(STATUS "Install component: \"${COMPONENT}\"") > SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") > ELSE(COMPONENT) > SET(CMAKE_INSTALL_COMPONENT) > ENDIF(COMPONENT) > ENDIF(NOT CMAKE_INSTALL_COMPONENT) > > FILE(INSTALL DESTINATION "/usr/Firewall/lib" TYPE SHARED_LIBRARY FILES > "/home/xavierd/tempbuild/firmware/tmp/libnbase.so") > FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/usr/Firewall/lib" TYPE > SHARED_ > LIBRARY FILES "/home/xavierd/tempbuild/firmware/tmp/libnbase.so") > > Why I have 2 FILE(INSTALL ....) ? is this a bug ? > > thanks for your help > > -- > Xavier Delannoy > > R&D engineer > [EMAIL PROTECTED] > http://www.netasq.com > Tél : +33 320 619 742 > Fax : +33 320 619 639 > > ----------------------------------------------------------------------- > This communication may contain information that is proprietary, > privileged or confidential or otherwise legally exempt from disclosure. > The information contained in this e-mail is intended solely for the > addressee. Access to this e-mail by anyone else or any unauthorized > review, use, disclosure or distribution is unauthorized and prohibited. > If you are not the named addressee indicated in this message (or > responsible for delivery of the message to such person), you are not > authorized to read, print, retain, copy or disseminate this message > or any part of it. If you have received this message in error, please > notify the sender immediately by fax or e-mail and delete and destroy > all copies of the message. If you are the intended recipient but do not > wish to receive communications through this medium, please advise the > sender immediately. The views expressed in this e-mail are not > necessarily the views of NetASQ. The company, its directors, officers > or employees make no representation or accept any liability for its > accuracy or completeness unless expressly stated to the contrary. > ------------------------------------------------------------------------ > _______________________________________________ > CMake mailing list > CMake@cmake.org > http://www.cmake.org/mailman/listinfo/cmake > -- Xavier Delannoy R&D engineer [EMAIL PROTECTED] http://www.netasq.com Tél : +33 320 619 742 Fax : +33 320 619 639 ----------------------------------------------------------------------- This communication may contain information that is proprietary, privileged or confidential or otherwise legally exempt from disclosure. The information contained in this e-mail is intended solely for the addressee. Access to this e-mail by anyone else or any unauthorized review, use, disclosure or distribution is unauthorized and prohibited. If you are not the named addressee indicated in this message (or responsible for delivery of the message to such person), you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by fax or e-mail and delete and destroy all copies of the message. If you are the intended recipient but do not wish to receive communications through this medium, please advise the sender immediately. The views expressed in this e-mail are not necessarily the views of NetASQ. The company, its directors, officers or employees make no representation or accept any liability for its accuracy or completeness unless expressly stated to the contrary. ------------------------------------------------------------------------ _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake