From c41f32bcca518ff8eb2b56221d640edfd9173299 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 7 Jan 2014 16:05:41 +0100 Subject: cmake: Remove unused macro modules. --- CMakeLists.txt | 4 ---- cmake/Modules/MacroAddCompileFlags.cmake | 21 -------------------- cmake/Modules/MacroAddLinkFlags.cmake | 20 ------------------- cmake/Modules/MacroAddPlugin.cmake | 30 ----------------------------- cmake/Modules/MacroCopyFile.cmake | 33 -------------------------------- 5 files changed, 108 deletions(-) delete mode 100644 cmake/Modules/MacroAddCompileFlags.cmake delete mode 100644 cmake/Modules/MacroAddLinkFlags.cmake delete mode 100644 cmake/Modules/MacroAddPlugin.cmake delete mode 100644 cmake/Modules/MacroCopyFile.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bdaf510..86a61a88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,10 +39,6 @@ include(CPackConfig.cmake) include(MacroEnsureOutOfSourceBuild) macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.") -# add macros -include(MacroAddPlugin) -include(MacroCopyFile) - # search for libraries if (WITH_ZLIB) find_package(ZLIB REQUIRED) diff --git a/cmake/Modules/MacroAddCompileFlags.cmake b/cmake/Modules/MacroAddCompileFlags.cmake deleted file mode 100644 index a866689d..00000000 --- a/cmake/Modules/MacroAddCompileFlags.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# - MACRO_ADD_COMPILE_FLAGS(target_name flag1 ... flagN) - -# Copyright (c) 2006, Oswald Buddenhagen, -# Copyright (c) 2006, Andreas Schneider, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -macro (MACRO_ADD_COMPILE_FLAGS _target) - - get_target_property(_flags ${_target} COMPILE_FLAGS) - if (_flags) - set(_flags ${_flags} ${ARGN}) - else (_flags) - set(_flags ${ARGN}) - endif (_flags) - - set_target_properties(${_target} PROPERTIES COMPILE_FLAGS ${_flags}) - -endmacro (MACRO_ADD_COMPILE_FLAGS) diff --git a/cmake/Modules/MacroAddLinkFlags.cmake b/cmake/Modules/MacroAddLinkFlags.cmake deleted file mode 100644 index 91cad306..00000000 --- a/cmake/Modules/MacroAddLinkFlags.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# - MACRO_ADD_LINK_FLAGS(target_name flag1 ... flagN) - -# Copyright (c) 2006, Oswald Buddenhagen, -# Copyright (c) 2006, Andreas Schneider, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -macro (MACRO_ADD_LINK_FLAGS _target) - - get_target_property(_flags ${_target} LINK_FLAGS) - if (_flags) - set(_flags "${_flags} ${ARGN}") - else (_flags) - set(_flags "${ARGN}") - endif (_flags) - - set_target_properties(${_target} PROPERTIES LINK_FLAGS "${_flags}") - -endmacro (MACRO_ADD_LINK_FLAGS) diff --git a/cmake/Modules/MacroAddPlugin.cmake b/cmake/Modules/MacroAddPlugin.cmake deleted file mode 100644 index 36b5e57e..00000000 --- a/cmake/Modules/MacroAddPlugin.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# - MACRO_ADD_PLUGIN(name [WITH_PREFIX] file1 .. fileN) -# -# Create a plugin from the given source files. -# If WITH_PREFIX is given, the resulting plugin will have the -# prefix "lib", otherwise it won't. -# -# Copyright (c) 2006, Alexander Neundorf, -# Copyright (c) 2006, Laurent Montel, -# Copyright (c) 2006, Andreas Schneider, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -macro (MACRO_ADD_PLUGIN _target_NAME _with_PREFIX) - - if (${_with_PREFIX} STREQUAL "WITH_PREFIX") - set(_first_SRC) - else (${_with_PREFIX} STREQUAL "WITH_PREFIX") - set(_first_SRC ${_with_PREFIX}) - endif (${_with_PREFIX} STREQUAL "WITH_PREFIX") - - add_library(${_target_NAME} MODULE ${_first_SRC} ${ARGN}) - - if (_first_SRC) - set_target_properties(${_target_NAME} PROPERTIES PREFIX "") - endif (_first_SRC) - -endmacro (MACRO_ADD_PLUGIN _name _sources) - diff --git a/cmake/Modules/MacroCopyFile.cmake b/cmake/Modules/MacroCopyFile.cmake deleted file mode 100644 index cee1cae3..00000000 --- a/cmake/Modules/MacroCopyFile.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# - macro_copy_file(_src _dst) -# Copies a file to ${_dst} only if ${_src} is different (newer) than ${_dst} -# -# Example: -# macro_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/icon.png ${CMAKE_CURRENT_BINARY_DIR}/.) -# Copies file icon.png to ${CMAKE_CURRENT_BINARY_DIR} directory -# -# Copyright (c) 2006-2007 Wengo -# Copyright (c) 2006-2008 Andreas Schneider -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING file. - - -macro (macro_copy_file _src _dst) - # Removes all path containing .svn or CVS or CMakeLists.txt during the copy - if (NOT ${_src} MATCHES ".*\\.svn|CVS|CMakeLists\\.txt.*") - - if (CMAKE_VERBOSE_MAKEFILE) - message(STATUS "Copy file from ${_src} to ${_dst}") - endif (CMAKE_VERBOSE_MAKEFILE) - - # Creates directory if necessary - get_filename_component(_path ${_dst} PATH) - file(MAKE_DIRECTORY ${_path}) - - execute_process( - COMMAND - ${CMAKE_COMMAND} -E copy_if_different ${_src} ${_dst} - OUTPUT_QUIET - ) - endif (NOT ${_src} MATCHES ".*\\.svn|CVS|CMakeLists\\.txt.*") -endmacro (macro_copy_file) -- cgit v1.2.3