[Cmake] ADD_CUSTOM_TARGET and SUBDIRS

Anton Deguet anton at cs . jhu . edu
29 Sep 2003 11:22:17 -0400


Hello,

I would like to create the same custom target in many subdirs and be
able to make the target from the parent directory:

-- parent directory with CMakeLists.txt <p>
   |-- subdir1 with CMakeLists.txt <1>
   `-- subdir2 with CMakeLists.txt <2>

All my CMakeLists in subdirs (1 and 2) have an
ADD_CUSTOM_TARGET(install_html ${BASH} myScript.sh).

How can I have a target in the parent CMakeLists.txt so that I can type
"make install_html" which does nothing but make the target
"install_html" in all the subdirectories?

Thank you,

Anton


-- 
Anton Deguet                          Systems Engineer
ERC CISST                     Johns Hopkins University
http://cisstweb . cs . jhu . edu                410 516 5261