Hello,
We are using CPack (WIX generator) to create an installer. This works fine but 
with one slight problem that the installer contains a component that I did not 
expect.
The main CMakeList.txt file includes;
SET(CPACK_COMPONENTS_ALL RUNTIME)
In a sub CMakeList.txt file I have the following line:
INSTALL(
  DIRECTORY ${DOC_PATH}
  DESTINATION ${INSTALL_DOC_DIR}
  COMPONENT DOC)
The current installer should not include this component but another installer 
will include this component.
In the cmake_install.cmake that correspond to the sub CMakeList.txt I find the 
code below. 

# Set the component getting installed.
IF(NOT CMAKE_INSTALL_COMPONENT) # true
  IF(COMPONENT) # false
    MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
    SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
  ELSE(COMPONENT)
    SET(CMAKE_INSTALL_COMPONENT)
  ENDIF(COMPONENT)
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "DOC")
  FILE(...)
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL 
"DOC")

Debugging this code, it appears "IF(NOT CMAKE_INSTALL_COMPONENT)" is true and 
"IF(COMPONENT)" is false. This means "CMAKE_INSTALL_COMPONENT" is set to empty. 
This again means "IF(NOT CMAKE_INSTALL_COMPONENT" will be true and the file(s) 
will be installed. 
So the problem seems to be rooted in the fact that "IF(COMPONENT)" is false. So 
who is responsible for setting the content of "COMPONENT" variable? 
Appreciate any help.
 
                                          
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Reply via email to