Fix installation when built by CMake 2.4

CMake 2.4 generates old-style cmake_install.cmake code including calls
to the file(INSTALL) command with the COMPONENTS argument.  We need to
set CMAKE_INSTALL_SELF_2_4 for the whole install tree to prevent the
command from complaining in this special case.  Previously this was
needed only in the QtDialog directory, but now it is needed in the
entire tree.
This commit is contained in:
Brad King 2009-07-31 08:27:36 -04:00
parent 121df27fa2
commit 36bb624907
2 changed files with 6 additions and 5 deletions

View File

@ -9,6 +9,12 @@ MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# Allow empty endif() and such with CMake 2.4.
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1)
IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
# Since the built CMake will install itself instead of the
# generating CMake, tell it that the install rules were generated
# by CMake 2.4.
INSTALL(CODE "SET(CMAKE_INSTALL_SELF_2_4 1)")
ENDIF()
#-----------------------------------------------------------------------
# a macro to deal with system libraries, implemented as a macro

View File

@ -74,11 +74,6 @@ ELSE(NOT QT4_FOUND)
ENDIF(APPLE)
SET(CMAKE_INSTALL_DESTINATION_ARGS
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
# Since the built CMake will install itself instead of the
# generating CMake, tell it that the install rules were generated
# by CMake 2.4.
INSTALL(CODE "SET(CMAKE_INSTALL_SELF_2_4 1)")
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
# if qt is not static and we are on windows then skip the install
# I don't want to distribute qt dlls