> I tried to
> add a target which do the cmake and define the variable like
> that : 
> 
> add_custom_target(MyInstall COMMAND "cmake -DLANG=%LANG%")
> add_dependencies(install MyInstall)
> 
> but I can't add the dependency between the two targets.


I think currently it is not possible to force anything to depend on
"install" target.

> > either: "Use COMPONENT option from INSTALL command"
> I will look forward into this since I don't know how it
> works.


Try

MACRO(ADD_INSTALL_TARGET VAR_NAME VAR_COMPONENT VAR_DEPENDS)
  ADD_CUSTOM_TARGET(${VAR_NAME}
                    COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${VAR_COMPONENT} -P 
${CMAKE_BINARY_DIR}/cmake_install.cmake
                    COMMENT "Performing component-specific installation"
                    VERBATIM)

  IF ( "${VAR_DEPENDS}" MATCHES "^.+$" )
    ADD_DEPENDENCIES(${VAR_NAME}  "${VAR_DEPENDS}")
  ENDIF ()
ENDMACRO ()

INSTALL( ... COMPONENT COMP_en_US)

ADD_INSTALL_TARGET(install-en_US COMP_en_US "Target1 Target2 Target3")



      
_______________________________________________
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