aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/CMakeLists.txt16
-rw-r--r--modules/CheckTypeSize.cmake64
-rw-r--r--modules/FindZLIB.cmake50
3 files changed, 8 insertions, 122 deletions
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 1496668a..95a053df 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -8,18 +8,18 @@ install( FILES kde4init_dummy.cpp.in kde4_cmake_uninstall.cmake.in ${cmakeFiles
# the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex
set(FILES_TO_REMOVE
+ ${module_install_dir}/CheckTypeSize.cmake
+ ${module_install_dir}/FindKDE3.cmake
+ ${module_install_dir}/FindKDE4.cmake
${module_install_dir}/FindQtDBus.cmake
- ${module_install_dir}/QtDBusMacros.cmake
+ ${module_install_dir}/FindZLIB.cmake
+ ${module_install_dir}/KDE3Macros.cmake
${module_install_dir}/MacroGetenvWinPath.cmake
- ${module_install_dir}/FindKDE4.cmake
+ ${module_install_dir}/QtDBusMacros.cmake
${module_install_dir}/UsePkgconfig.cmake
- ${module_install_dir}/FindKDE3.cmake
- ${module_install_dir}/KDE3Macros.cmake
${module_install_dir}/kde3uic.cmake
- ${module_install_dir}/kde3init_dummy.cpp.in )
-
-# remove the following files once we depend on cmake >= 2.4.3
-# FindZLIB.cmake
+ ${module_install_dir}/kde3init_dummy.cpp.in
+)
install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake )
diff --git a/modules/CheckTypeSize.cmake b/modules/CheckTypeSize.cmake
deleted file mode 100644
index b666f847..00000000
--- a/modules/CheckTypeSize.cmake
+++ /dev/null
@@ -1,64 +0,0 @@
-# - Check sizeof a type
-# CHECK_TYPE_SIZE(TYPE VARIABLE)
-# Check if the type exists and determine size of type. if the type
-# exists, the size will be stored to the variable.
-# VARIABLE - variable to store size if the type exists.
-# HAVE_${VARIABLE} - does the variable exists or NOT
-#
-# remove once we require cmake 2.4.1
-
-# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
-# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
-
-MACRO (CHECK_TYPE_SIZE TYPE VARIABLE)
- SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
- IF ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- SET(CHECK_TYPE_SIZE_TYPE "${TYPE}")
- SET(MACRO_CHECK_TYPE_SIZE_FLAGS
- "${CMAKE_REQUIRED_FLAGS}")
- FOREACH (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
- IF ("${def}")
- SET(MACRO_CHECK_TYPE_SIZE_FLAGS
- "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
- ENDIF ("${def}")
- ENDFOREACH (def)
- SET(CHECK_TYPE_SIZE_PREINCLUDE)
- SET(CHECK_TYPE_SIZE_PREMAIN)
- FOREACH (def ${CMAKE_EXTRA_INCLUDE_FILES})
- SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
- ENDFOREACH (def)
- CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSize.c.in"
- "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
- FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
- CHECK_TYPE_SIZE_FILE_CONTENT)
- MESSAGE(STATUS "Check size of ${TYPE}")
- IF (CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_TYPE_SIZE_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- ENDIF (CMAKE_REQUIRED_LIBRARIES)
-
- IF (CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_TYPE_SIZE_ADD_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ENDIF (CMAKE_REQUIRED_INCLUDES)
-
- TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
- ${CMAKE_BINARY_DIR}
- "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
- "${CHECK_TYPE_SIZE_ADD_INCLUDES}"
- "${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT)
- IF (HAVE_${VARIABLE})
- MESSAGE(STATUS "Check size of ${TYPE} - done")
- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
- "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
- ELSE (HAVE_${VARIABLE})
- MESSAGE(STATUS "Check size of ${TYPE} - failed")
- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
- ENDIF (HAVE_${VARIABLE})
- ENDIF ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
-ENDMACRO (CHECK_TYPE_SIZE)
diff --git a/modules/FindZLIB.cmake b/modules/FindZLIB.cmake
deleted file mode 100644
index c943cc3b..00000000
--- a/modules/FindZLIB.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-# - Find zlib
-# Find the native ZLIB includes and library
-#
-# ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
-# ZLIB_LIBRARIES - List of libraries when using zlib.
-# ZLIB_FOUND - True if zlib found.
-
-# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
-# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
-
-IF (ZLIB_INCLUDE_DIR)
- # Already in cache, be silent
- SET(ZLIB_FIND_QUIETLY TRUE)
-ENDIF (ZLIB_INCLUDE_DIR)
-
-FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
- /usr/local/include
- /usr/include
-)
-
-SET(ZLIB_NAMES z zlib zdll)
-FIND_LIBRARY(ZLIB_LIBRARY
- NAMES ${ZLIB_NAMES}
- PATHS /usr/lib /usr/local/lib
-)
-
-IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
- SET(ZLIB_FOUND TRUE)
- SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
-ELSE (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
- SET(ZLIB_FOUND FALSE)
- SET( ZLIB_LIBRARIES )
-ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
-
-IF (ZLIB_FOUND)
- IF (NOT ZLIB_FIND_QUIETLY)
- MESSAGE(STATUS "Found ZLIB: ${ZLIB_LIBRARY}")
- ENDIF (NOT ZLIB_FIND_QUIETLY)
-ELSE (ZLIB_FOUND)
- IF (ZLIB_FIND_REQUIRED)
- MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
- MESSAGE(FATAL_ERROR "Could NOT find z library")
- ENDIF (ZLIB_FIND_REQUIRED)
-ENDIF (ZLIB_FOUND)
-
-MARK_AS_ADVANCED(
- ZLIB_LIBRARY
- ZLIB_INCLUDE_DIR
- )