diff options
author | Brad King <brad.king@kitware.com> | 2009-12-10 14:10:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-12-10 14:10:12 (GMT) |
commit | 30f17e293261ec9e667b75b13fa1b70060a9cc7b (patch) | |
tree | d914f7293aee1813b94919dd87b06feebbf61657 /CMakeLists.txt | |
parent | 31e268201530eda53f0ac8dc4a3ec5bac19f3006 (diff) | |
download | CMake-30f17e293261ec9e667b75b13fa1b70060a9cc7b.zip CMake-30f17e293261ec9e667b75b13fa1b70060a9cc7b.tar.gz CMake-30f17e293261ec9e667b75b13fa1b70060a9cc7b.tar.bz2 |
Fix installation of CMake itself
CMake 2.8.0 and below use the EXECUTABLE_OUTPUT_PATH setting from the
top-level CMakeLists.txt file to compute the location of the "cmake"
target for the special case of installing cmake over itself.
The commit "Clean up CMake build tree 'bin' directory" moved the setting
of EXECUTABLE_OUTPUT_PATH that affects the "cmake" target into the
Source subdirectory. This broke the special-case lookup in the top
level. We fix it by setting EXECUTABLE_OUTPUT_PATH at the end of the
top-level CMakeLists.txt file. Now that we use add_subdirectory to
process the subdirectories in order, this setting does not affect the
subdirectories. Thus we fix installation while preserving the clean
build tree 'bin' directory intended by the above-mentioned commit.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fc788a..173e923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -476,3 +476,10 @@ INSTALL( #----------------------------------------------------------------------- # End of the main section of the CMakeLists file #----------------------------------------------------------------------- + +# As a special case when building CMake itself, CMake 2.8.0 and below +# look up EXECUTABLE_OUTPUT_PATH in the top-level CMakeLists.txt file +# to compute the location of the "cmake" executable. We set it here +# so that those CMake versions can find it. We wait until after all +# the add_subdirectory() calls to avoid affecting the subdirectories. +SET(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR}) |