MDEV-3971  : problems installing MariaDB packages (conflicts with mysql-libs-5.5) FIx  : make "shared" RPM obsolete/provide mysql-libs

--- cmake/cpack_rpm.cmake
+++ cmake/cpack_rpm.cmake
@@ -107,8 +107,8 @@
 SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
 SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh)

-SET(CPACK_RPM_shared_PACKAGE_OBSOLETES "mysql-shared MySQL-shared-standard MySQL-shared-pro MySQL-shared-pro-cert MySQL-shared-pro-gpl MySQL-shared-pro-gpl-cert MySQL-shared MySQL-OurDelta-shared")
-SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MariaDB-shared MySQL-shared mysql-shared libmysqlclient.so.18 libmysqlclient.so.18(libmysqlclient_16) libmysqlclient.so.18(libmysqlclient_18) libmysqlclient_r.so.18 libmysqlclient_r.so.18(libmysqlclient_18)")
+SET(CPACK_RPM_shared_PACKAGE_OBSOLETES "mysql-shared MySQL-shared-standard MySQL-shared-pro MySQL-shared-pro-cert MySQL-shared-pro-gpl MySQL-shared-pro-gpl-cert MySQL-shared MySQL-OurDelta-shared mysql-libs")
+SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MariaDB-shared MySQL-shared mysql-shared libmysqlclient.so.18 libmysqlclient.so.18(libmysqlclient_16) libmysqlclient.so.18(libmysqlclient_18) libmysqlclient_r.so.18 libmysqlclient_r.so.18(libmysqlclient_18) mysql-libs")
 SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
 SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)


Added dump target command to produce a detailed dump/disassembly of the resulting firmware

--- cmake/gcc_stm32.cmake
+++ cmake/gcc_stm32.cmake
@@ -59,6 +59,7 @@
 SET(CMAKE_OBJDUMP ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objdump${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "objdump tool")
 SET(CMAKE_SIZE ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-size${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "size tool")
 SET(CMAKE_DEBUGER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gdb${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "debuger")
+SET(CMAKE_CPPFILT ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-c++filt${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "C++filt")

 SET(CMAKE_C_FLAGS_DEBUG "-Og -g" CACHE INTERNAL "c compiler flags debug")
 SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g" CACHE INTERNAL "cxx compiler flags debug")
@@ -83,6 +84,15 @@
     ENDIF()
     ADD_CUSTOM_TARGET(${TARGET}.hex DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Oihex ${FILENAME} ${FILENAME}.hex)
     ADD_CUSTOM_TARGET(${TARGET}.bin DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Obinary ${FILENAME} ${FILENAME}.bin)
+ENDFUNCTION()
+
+FUNCTION(STM32_ADD_DUMP_TARGET TARGET)
+    IF(EXECUTABLE_OUTPUT_PATH)
+      SET(FILENAME "${EXECUTABLE_OUTPUT_PATH}/${TARGET}")
+    ELSE()
+      SET(FILENAME "${TARGET}")
+    ENDIF()
+    ADD_CUSTOM_TARGET(${TARGET}.dump DEPENDS ${TARGET} COMMAND ${CMAKE_OBJDUMP} -x -D -S -s ${FILENAME} | ${CMAKE_CPPFILT} > ${FILENAME}.dump)
 ENDFUNCTION()

 FUNCTION(STM32_PRINT_SIZE_OF_TARGETS TARGET)


do not look for NSIS, let cpack find it

do not look for NSIS, let cpack find it

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@3175 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -25,10 +25,7 @@

 # NSIS
 if(WIN32)
-  find_program(NSIS_PROGRAM makensis MakeNSIS)
-  if(EXISTS ${NSIS_PROGRAM})
-    list(APPEND CPACK_GENERATOR "NSIS")
-  endif(EXISTS ${NSIS_PROGRAM})
+  list(APPEND CPACK_GENERATOR "NSIS")
   if(CMAKE_CL_64)
     set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
     set(win_system_name win64)


Add ARM64 packaging support

Add ARM64 packaging support

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -33,6 +33,9 @@
 elseif(ARM)
   set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf")
   set(CPACK_RPM_PACKAGE_ARCHITECTURE "armhf")
+elseif(AARCH64)
+  set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64")
+  set(CPACK_RPM_PACKAGE_ARCHITECTURE "aarch64")
 else()
   set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
   set(CPACK_RPM_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})


cmake: check BOARD and SOC roots before use

People frequently do things like setting BOARD_ROOT to
/my/module/boards/arm/my_board when it should be set to /my/module.

Similar misconfigurations happen for SOC_ROOT.

Emit warnings in these situations to try to point users in the right
direction.

A similar change could be made for DTS_ROOT, but that is trickier
since at least one directory (the application root) is legitimately
added to it that does not always contain dts/ or include/
subdirectories.

Signed-off-by: Martí Bolívar <9d90ac4c7bf6a305f6bfd81a23c7859bc883380e@nordicsemi.no>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -242,6 +242,15 @@
 endif()

 foreach(root ${BOARD_ROOT})
+  # Check that the board root looks reasonable.
+  if(NOT IS_DIRECTORY "${root}/boards")
+    message(WARNING "BOARD_ROOT element without a 'boards' subdirectory:
+${root}
+Hints:
+  - if your board directory is '/foo/bar/boards/<ARCH>/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory
+  - if in doubt, use absolute paths")
+  endif()
+
   # NB: find_path will return immediately if the output variable is
   # already set
   if (BOARD_ALIAS)
@@ -557,6 +566,15 @@
 # Use SOC to search for a 'CMakeLists.txt' file.
 # e.g. zephyr/soc/xtense/intel_apl_adsp/CMakeLists.txt.
 foreach(root ${SOC_ROOT})
+  # Check that the root looks reasonable.
+  if(NOT IS_DIRECTORY "${root}/soc")
+    message(WARNING "SOC_ROOT element without a 'soc' subdirectory:
+${root}
+Hints:
+  - if your SoC family directory is '/foo/bar/soc/<ARCH>/my_soc_family', then add '/foo/bar' to SOC_ROOT, not the entire SoC family path
+  - if in doubt, use absolute paths")
+  endif()
+
   if(EXISTS ${root}/soc/${ARCH}/${SOC_PATH})
     set(SOC_DIR ${root}/soc)
     break()


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(buffer VERSION 0.1.5)
+hunter_config(buffer VERSION 0.1.6)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)
 hunter_config(Android-Build-Tools VERSION 22.0.1)


CMake: Use 'patch' instead of 'git am'

CMake: Use 'patch' instead of 'git am'

Git invocations without an available gitconfig (ex. a test environment)
will fail whereas patch should always work. This adds a build dependecy on patch.

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -29,7 +29,7 @@
             ext_mkldnn
             GIT_REPOSITORY ${MKLDNN_GIT_REPO_URL}
             UPDATE_COMMAND ""
-            PATCH_COMMAND git am ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
+            PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
             CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
             )
     else()


Allow resource installation

Allow resource installation

Any files can be installed into a res directory

--- cmake/includes/Export.cmake
+++ cmake/includes/Export.cmake
@@ -19,12 +19,13 @@
 #       add_library(name STATIC)
 # BINS: list of target names, same values as the target named in
 #       add_executable
+# RES:  list of absolute paths to resource files
 #
 ###############################################################################
 function(export_project)
     set(options )
     set(oneValueArgs NAME VERSION)
-    set(multiValueArgs INCLUDES LIBS ARCHIVES BINS)
+    set(multiValueArgs INCLUDES LIBS ARCHIVES BINS RES)
     cmake_parse_arguments(EXP "${options}" "${oneValueArgs}"
         "${multiValueArgs}" ${ARGN})

@@ -118,6 +119,13 @@
                 "list(APPEND ${EXP_NAME_uc}_BINARIES ${f})\n")
         endforeach()
     endif()
+    # install resources
+    if(EXP_RES)
+        install(
+            FILES ${EXP_RES}
+            DESTINATION ${CMAKE_INSTALL_PREFIX}/res
+        )
+    endif()

     # write the version file
     include(CMakePackageConfigHelpers)


Cleanup based on rnk's feedback.

Cleanup based on rnk's feedback.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@235125 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -425,22 +425,18 @@
     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO")
       if(ARG_SHARED OR BUILD_SHARED_LIBS)
         if(WIN32 OR CYGWIN)
-          install(TARGETS ${name}
-            EXPORT LLVMExports
-            RUNTIME DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-            COMPONENT ${name})
+          set(install_type RUNTIME)
         else()
-          install(TARGETS ${name}
-            EXPORT LLVMExports
-            LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-            COMPONENT ${name})
+          set(install_type LIBRARY)
         endif()
       else()
-        install(TARGETS ${name}
-          EXPORT LLVMExports
-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-          COMPONENT ${name})
+        set(install_type ARCHIVE)
       endif()
+
+      install(TARGETS ${name}
+            EXPORT LLVMExports
+            ${install_type} DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+            COMPONENT ${name})

       if (NOT CMAKE_CONFIGURATION_TYPES)
         add_custom_target(install-${name}


Added an option in common_library to not auto generate a top level project header.

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -10,6 +10,7 @@
 # * NAME_LINK_LIBRARIES for dependencies of name
 # * NAME_LIBRARY_TYPE or COMMON_LIBRARY_TYPE for SHARED or STATIC library, with
 #   COMMON_LIBRARY_TYPE being an option stored in the CMakeCache.
+# * NAME_OMIT_PROJECT_HEADER when set, no project header (name.h) is generated.
 # * PROJECT_INCLUDE_NAME for the include directory and project include header
 # * VERSION for the API version
 # * VERSION_ABI for the ABI version
@@ -28,16 +29,7 @@
   "Library type {any combination of SHARED, STATIC}")
 set_property(CACHE COMMON_LIBRARY_TYPE PROPERTY STRINGS SHARED STATIC)

-function(COMMON_LIBRARY Name)
-  string(TOUPPER ${Name} NAME)
-  if(NOT PROJECT_INCLUDE_NAME)
-    string(TOLOWER ${Name} PROJECT_INCLUDE_NAME)
-  endif()
-  set(SOURCES ${${NAME}_SOURCES})
-  set(HEADERS ${${NAME}_HEADERS})
-  set(PUBLIC_HEADERS ${${NAME}_PUBLIC_HEADERS})
-  set(LINK_LIBRARIES ${${NAME}_LINK_LIBRARIES})
-
+macro(GENERATE_PROJECT_HEADER NAME)
   get_filename_component(BASE_NAME ${PROJECT_INCLUDE_NAME} NAME)

   set(PROJECT_GENERATED_HEADER
@@ -67,6 +59,21 @@
     ${PROJECT_GENERATED_HEADER}
     ${PROJECT_INCLUDE_HEADER} COPYONLY)
   list(APPEND PUBLIC_HEADERS ${PROJECT_INCLUDE_HEADER})
+endmacro()
+
+function(COMMON_LIBRARY Name)
+  string(TOUPPER ${Name} NAME)
+  if(NOT PROJECT_INCLUDE_NAME)
+    string(TOLOWER ${Name} PROJECT_INCLUDE_NAME)
+  endif()
+  set(SOURCES ${${NAME}_SOURCES})
+  set(HEADERS ${${NAME}_HEADERS})
+  set(PUBLIC_HEADERS ${${NAME}_PUBLIC_HEADERS})
+  set(LINK_LIBRARIES ${${NAME}_LINK_LIBRARIES})
+
+  if(NOT ${NAME}_OMIT_PROJECT_HEADER)
+    generate_project_header(${NAME})
+  endif()

   if(SOURCES)
     list(SORT SOURCES)


#19 Removed debug message

#19 Removed debug message

--- RunShellCommand.cmake
+++ RunShellCommand.cmake
@@ -9,7 +9,6 @@
 					COMMAND BatchBridgeToShell ARGS ${MINGW_DIR} ${cmd}
 					WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
 	else()
-		message(STATUS "add_custom_command(TARGET ${target} ${phase} COMMAND bash ARGS -c \"${cmd}\" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}")
 		add_custom_target(BuildFFMPEG ALL DEPENDS "ffmpeg-libs")
 		add_custom_command(OUTPUT "ffmpeg-libs"
 					COMMAND bash ARGS -c \"${cmd}\"


Do not mess with LCOV_EXCLUDE which is set by outside users

After #486, excluding the tests is not needed anymore.

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -167,8 +167,5 @@
 add_dependencies(${PROJECT_NAME}-nightlytests ${PROJECT_NAME}-perftests)

 if(COMMON_ENABLE_COVERAGE)
-  foreach(TEST_FILE ${TEST_FILES})
-    list(APPEND LCOV_EXCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/${TEST_FILE}")
-  endforeach()
   add_coverage_targets(${PROJECT_NAME}-cpptests)
 endif()


Specify log level for CMake messages (less stderr)

Summary:
Specify message levels in CMake. Prefer STATUS (stdout).

As the default message mode (i.e. level) is NOTICE in CMake, more then necessary messages get printed to stderr. Some tools,  noticably ccmake treat this as an error and require additional confirmation and re-running CMake's configuration step.

This commit specifies a mode (either STATUS or WARNING or FATAL_ERROR)  instead of the default.

* I used `csearch -f 'llvm-project/.+(CMakeLists\.txt|cmake)' -l 'message\("'` to find all locations.
* Reviewers were chosen by the most common authors of specific files. If there are more suitable reviewers for these CMake changes, please let me know.

Patch by: Christoph Siedentop

Reviewers: zturner, beanz, xiaobai, kbobyrev, lebedev.ri, sgraenitz

Reviewed By: sgraenitz

Subscribers: mgorny, lebedev.ri, #sanitizers, lldb-commits, llvm-commits

Tags: #sanitizers, #lldb, #llvm

Differential Revision: https://reviews.llvm.org/D63370

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@363821 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -410,8 +410,8 @@
         INCLUDE ${arch}_FUNCTIONS
         ${${arch}_SOURCES})
       if(NOT ${arch}_filtered_sources)
-        message("${arch}_SOURCES: ${${arch}_SOURCES}")
-        message("${arch}_FUNCTIONS: ${${arch}_FUNCTIONS}")
+        message(WARNING "${arch}_SOURCES: ${${arch}_SOURCES}")
+        message(WARNING "${arch}_FUNCTIONS: ${${arch}_FUNCTIONS}")
         message(FATAL_ERROR "Empty filtered sources!")
       endif()
     endforeach()


extend print_build_info()

extend print_build_info()

--- include/config.hpp.cmake
+++ include/config.hpp.cmake
@@ -31,10 +31,11 @@
 #endif

 constexpr auto print_build_info = []() {
-    std::cout << PROG_NAME << " " << PROG_VERSION << '\n'
-              << "Copyright (C) 2017 Tmplt <tmplt@dragons.rocks>.\n"
+    std::cout << PROG_NAME << ' ' << PROG_VERSION << '\n'
+              << "Copyright (C) 2017 Tmplt <tmplt@dragons.rocks>\n"
               << PROG_NAME << " is licensed under the GPLv3+ license, "
-              << "see <https://github.com/Tmplt/bookwyrm/blob/cpp/master/LICENSE>.\n\n"
+              << "see <http://www.gnu.org/licenses/gpl.html>.\n"
+              << "This if free software: you are free to change and redistribute it.\n\n"
               << "Written by Tmplt and others, see <https://github.com/Tmplt/bookwyrm/blob/cpp/master/AUTHORS.md>."
               << std::endl;
 };


single xpSourceListAppend call in externpro

--- modules/macpro.cmake
+++ modules/macpro.cmake
@@ -140,23 +140,15 @@
   file(APPEND ${stepBuild} "message(STATUS \"[build] -- configurations: \${BUILD_CONFIGS}\")\n")
   file(APPEND ${stepBuild} "message(STATUS \"XP_STEP: build\")\n")
   file(APPEND ${stepBuild} "proSetStageDir()\n")
-  ####
+endmacro()
+
+macro(proAddProjectDir proDir) # NOTE: called by top-level CMakeLists.txt
   include(${MODULES_DIR}/xpfunmac.cmake)
-  file(GLOB srcList ${CMAKE_BINARY_DIR}/pro_*.cmake ${MODULES_DIR}/*.cmake ${MODULES_DIR}/*.in)
-  xpSourceListAppend("${srcList}")
-endmacro()
-
-macro(proAddProjectDir proDir) # NOTE: called by top-level CMakeLists.txt
+  xpMarkdownReadmeInit()
   get_filename_component(PRO_DIR ${proDir} ABSOLUTE)
   get_filename_component(PATCH_DIR ${PRO_DIR}/../patches ABSOLUTE)
-  xpMarkdownReadmeInit()
-  # include the project.cmake and usexp-project-config.cmake files
   file(GLOB projects ${PRO_DIR}/*.cmake)
-  file(GLOB useScripts ${PRO_DIR}/use/usexp-*-config.cmake)
   list(SORT projects) # sort list in-place alphabetically
-  list(SORT useScripts)
-  xpSourceListAppend("${projects}")
-  xpSourceListAppend("${useScripts}")
   foreach(proj ${projects})
     include(${proj})
     get_filename_component(pro ${proj} NAME_WE)
@@ -185,8 +177,15 @@
     endif()
     xpMarkdownReadmeAppend(${pro})
   endforeach()
-  file(GLOB files ${PRO_DIR}/README* ${PROJECT_SOURCE_DIR}/README*)
-  xpSourceListAppend("${files}")
+  file(GLOB xpfiles
+    ${PROJECT_SOURCE_DIR}/README* ${PROJECT_SOURCE_DIR}/LICENSE*
+    ${PRO_DIR}/README*
+    ${CMAKE_BINARY_DIR}/pro_*.cmake
+    ${MODULES_DIR}/*.cmake ${MODULES_DIR}/*.in
+    ${PRO_DIR}/use/usexp-*-config.cmake
+    )
+  list(APPEND xpfiles ${projects})
+  xpSourceListAppend("${xpfiles}")
 endmacro()

 macro(proExecuteStep) # NOTE: called by top-level CMakeLists.txt


[FIX] always include pthread with whole-archive

Since the static flag might be included after the seqan config is parsed,
we need to include this unconditionally. It doesn't seem to affect
dynamic linking so there is no problem.

--- util/cmake/seqan-config.cmake
+++ util/cmake/seqan-config.cmake
@@ -298,12 +298,9 @@
   set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} rt)
 endif ()

+# some OSes don't link pthread fully when building statically so we explicitly include whole archive
 if (UNIX AND NOT APPLE)
-  if ((CMAKE_CXX_FLAGS MATCHES "-static") OR (SEQAN_CXX_FLAGS MATCHES "-static") OR (CMAKE_EXE_LINKER_FLAGS MATCHES "-static"))
     set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
-  else ()
-    set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} pthread)
-  endif ()
 endif ()

 if ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") OR (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD"))


fixing output path when used in a dependency to use the top project by default. that is cmake behavior, and it might not be customisable ?

--- WkBuild.cmake
+++ WkBuild.cmake
@@ -442,13 +442,13 @@
 	# Defining where to put what has been built
 	#

-	SET(${PROJECT_NAME}_LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_LIB_DIR} CACHE PATH "Ouput directory for ${Project} libraries." )
-	mark_as_advanced(FORCE ${PROJECT_NAME}_LIBRARY_OUTPUT_PATH)
-	SET(LIBRARY_OUTPUT_PATH "${${PROJECT_NAME}_LIBRARY_OUTPUT_PATH}" CACHE INTERNAL "Internal CMake libraries output directory. Do not edit." FORCE)
-
-	SET(${PROJECT_NAME}_EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${${PROJECT_NAME}_BIN_DIR} CACHE PATH "Ouput directory for ${Project} executables." )
-	mark_as_advanced(FORCE ${PROJECT_NAME}_EXECUTABLE_OUTPUT_PATH)
-	SET(EXECUTABLE_OUTPUT_PATH "${${PROJECT_NAME}_EXECUTABLE_OUTPUT_PATH}" CACHE INTERNAL "Internal CMake executables output directory. Do not edit." FORCE)
+	SET(${CMAKE_PROJECT_NAME}_LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${${CMAKE_PROJECT_NAME}_LIB_DIR} CACHE PATH "Ouput directory for ${Project} libraries." )
+	mark_as_advanced(FORCE ${CMAKE_PROJECT_NAME}_LIBRARY_OUTPUT_PATH)
+	SET(LIBRARY_OUTPUT_PATH "${${CMAKE_PROJECT_NAME}_LIBRARY_OUTPUT_PATH}" CACHE INTERNAL "Internal CMake libraries output directory. Do not edit." FORCE)
+
+	SET(${CMAKE_PROJECT_NAME}_EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${${CMAKE_PROJECT_NAME}_BIN_DIR} CACHE PATH "Ouput directory for ${Project} executables." )
+	mark_as_advanced(FORCE ${CMAKE_PROJECT_NAME}_EXECUTABLE_OUTPUT_PATH)
+	SET(EXECUTABLE_OUTPUT_PATH "${${CMAKE_PROJECT_NAME}_EXECUTABLE_OUTPUT_PATH}" CACHE INTERNAL "Internal CMake executables output directory. Do not edit." FORCE)

 	#
 	# Copying include directory if needed after build ( for  use by another project later )


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   17)
+SET(KWSYS_DATE_STAMP_DAY   18)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   02)
+SET(KWSYS_DATE_STAMP_DAY   03)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   13)
+SET(KWSYS_DATE_STAMP_DAY   14)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   27)
+SET(KWSYS_DATE_STAMP_DAY   28)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


Not sure why this hadn't shown up until now, but [56074] missed a case of "if( ${SYSTEM_NAME} ... )" needing to be "if( SYSTEM_NAME ... )".

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -322,7 +322,7 @@
 		include_directories( ${CONDOR_EXTERNAL_DIR}/bundles/pcre/7.6/include-darwin )
 		set( HAVE_PCRE_H "${CONDOR_EXTERNAL_DIR}/bundles/pcre/7.6/include-darwin" CACHE PATH "Path to pcre header." )
 	else()
-		if( ${SYSTEM_NAME} STREQUAL "sl6.3" )
+		if( SYSTEM_NAME STREQUAL "sl6.3" )
 			include_directories( ${CONDOR_EXTERNAL_DIR}/bundles/pcre/8.40/include )
 			set( HAVE_PCRE_H FALSE )
 			set( HAVE_PCRE_PCRE_H FALSE )


fixed error in compile-tool

fixed error in compile-tool

--- cmake/tooling/compile_tool.cmake
+++ cmake/tooling/compile_tool.cmake
@@ -9,7 +9,7 @@
   ans(chksum)

   cmakepp_config(temp_dir)
-  ans(tempdir)
+  ans(temp_dir)

   set(dir "${temp_dir}/tools/${chksum}")


cleanup FindOpenCasCade.cmake

cleanup FindOpenCasCade.cmake

--- cmake_modules/FindOpenCasCade.cmake
+++ cmake_modules/FindOpenCasCade.cmake
@@ -1,141 +1,95 @@
-# Try to find OCE / OCC
+# Try to find OCC
 # Once done this will define
 #
 # OCC_FOUND          - system has OCC - OpenCASCADE
 # OCC_INCLUDE_DIR    - where the OCC include directory can be found
 # OCC_LIBRARY_DIR    - where the OCC library directory can be found
 # OCC_LIBRARIES      - Link this to use OCC
-# OCC_OCAF_LIBRARIES - Link this to use OCC OCAF framework

-# First try to find OpenCASCADE Community Edition
-if(NOT DEFINED OCE_DIR)
-  if(UNIX)
-    set(OCE_DIR "/usr/local/share/cmake/")
-  elseif(WIN32)
-    set(OCE_DIR "c:/OCE-0.4.0/share/cmake")
-  endif()
-endif()
-
-find_package(OCE QUIET)
-if(0 AND OCE_FOUND)
-  message(STATUS "-- OpenCASCADE Community Edition has been found.")
-  # Disable this define. For more details see bug #0001872
-  #add_definitions (-DHAVE_CONFIG_H)
-  set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
-  #set(OCC_LIBRARY_DIR ${OCE_LIBRARY_DIR})
-else(0 AND OCE_FOUND) #look for OpenCASCADE
-  if(WIN32)
-    if(CYGWIN OR MINGW)
-    FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
-        /usr/include/oce
-        /usr/include/opencascade
-        /usr/local/include/opencascade
-        /opt/opencascade/include
-        /opt/opencascade/inc
-      )
-      FIND_LIBRARY(OCC_LIBRARY TKernel
-        /usr/lib
-        /usr/local/lib
-        /opt/opencascade/lib
-      )
-    else(CYGWIN OR MINGW)
-    FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
-        "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
-      )
-      FIND_LIBRARY(OCC_LIBRARY TKernel
-        "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
-      )
-    endif(CYGWIN OR MINGW)
-  else(WIN32)
-    FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
-      /usr/include/oce
+if(WIN32)
+    find_path(OCC_INCLUDE_DIR Standard_Version.hxx PATH_SUFFIXES inc ../inc)
+    find_library(OCC_LIBRARY TKernel)
+else(WIN32)
+    find_path(OCC_INCLUDE_DIR Standard_Version.hxx
       /usr/include/opencascade
       /usr/local/include/opencascade
       /opt/opencascade/include
       /opt/opencascade/inc
     )
-    FIND_LIBRARY(OCC_LIBRARY TKernel
+    find_library(OCC_LIBRARY TKernel
       /usr/lib
       /usr/local/lib
       /opt/opencascade/lib
     )
-  endif(WIN32)
-  if(OCC_LIBRARY)
-    GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
-  endif(OCC_LIBRARY)
-endif(0 AND OCE_FOUND)
+endif(WIN32)
+
+if(OCC_LIBRARY)
+    get_filename_component(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
+endif(OCC_LIBRARY)

 if(OCC_INCLUDE_DIR)
-  file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
-    REGEX "#define OCC_VERSION_MAJOR.*"
-  )
-  string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
-  file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
-    REGEX "#define OCC_VERSION_MINOR.*"
-  )
-  string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
-  file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
-    REGEX "#define OCC_VERSION_MAINTENANCE.*"
-  )
-  string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
+    file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
+      REGEX "#define OCC_VERSION_MAJOR.*"
+    )
+    string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
+    file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
+      REGEX "#define OCC_VERSION_MINOR.*"
+    )
+    string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
+    file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
+      REGEX "#define OCC_VERSION_MAINTENANCE.*"
+    )
+    string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})

-  set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
+    set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
 endif(OCC_INCLUDE_DIR)

-# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if
-# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)

-if(OCC_FOUND)
-  set(OCC_LIBRARIES
-    -L${OCC_LIBRARY_DIR}
-    FWOSPlugin
-    TKFillet
-    TKMesh
+set(OCC_LIBRARY_NAMES
+    TKBO
+    TKBool
+    TKBRep
+    TKCAF
+    TKCDF
     TKernel
     TKG2d
     TKG3d
-    TKMath
-    TKIGES
-    TKSTL
-    TKShHealing
-    TKXSBase
-    TKBool
-    TKBO
-    TKBRep
-    TKTopAlgo
     TKGeomAlgo
     TKGeomBase
+    TKHLR
+    TKIGES
+    TKLCAF
+    TKMath
+    TKMesh
     TKOffset
     TKPrim
+    TKService
+    TKShHealing
     TKSTEP
+    TKSTEP209
+    TKSTEPAttr
     TKSTEPBase
-    TKSTEPAttr
-    TKHLR
-    TKFeat
-    TKCAF
+    TKSTL
+    TKTopAlgo
+    TKV3d
     TKXCAF
-    TKLCAF
+    TKXDEIGES
     TKXDESTEP
-    TKXDEIGES
-    TKMeshVS
-  )
-  set(OCC_OCAF_LIBRARIES
-    TKCAF
-    TKXCAF
-    TKLCAF
-    TKXDESTEP
-    TKXDEIGES
-    TKMeshVS
-  )
-  if(OCC_VERSION_STRING VERSION_LESS 6.7.3)
-    list(APPEND OCC_OCAF_LIBRARIES TKAdvTools)
-  endif(OCC_VERSION_STRING VERSION_LESS 6.7.3)
-  message(STATUS "-- Found OCE/OpenCASCADE version: ${OCC_VERSION_STRING}")
-  message(STATUS "-- OCE/OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
-  message(STATUS "-- OCE/OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
-  message(STATUS "-- OCE/OpenCASCADE shared libraries :\n ${OCC_LIBRARIES}")
-else(OCC_FOUND)
-  message("Neither OpenCASCADE Community Edition nor OpenCasCade were found: will not build CAD modules!")
+    TKXSBase
+)
+
+foreach( libname ${OCC_LIBRARY_NAMES} )
+    find_library( ${libname} ${libname} ${OCC_LIBRARY_DIR} )
+    set(OCC_LIBRARIES ${OCC_LIBRARIES} ${${libname}})
+endforeach()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING ${OCC_LIBRARIY_NAMES})
+
+if(OCC_FOUND)
+    message(STATUS "-- Found OpenCASCADE version: ${OCC_VERSION_STRING}")
+    message(STATUS "-- OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
+    message(STATUS "-- OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
+    message(STATUS "-- OpenCASCADE shared libraries :\n ${OCC_LIBRARIES}")
 endif(OCC_FOUND)
+


Improve inclusion of I2C driver for STM32F4 (#911)

--- CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
+++ CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
@@ -64,22 +64,7 @@
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/EXTIv1
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2
-
-            if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR
-               ${CHIBIOS_BOARD} STREQUAL "ST_STM32F4_DISCOVERY" OR
-               ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL" OR
-               ${CHIBIOS_BOARD} STREQUAL "NETDUINO3_WIFI" OR
-               ${CHIBIOS_BOARD} STREQUAL "I2M_ELECTRON_NF" OR
-               ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
-               ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F401RE_NF" OR
-               ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF" OR
-               ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF" OR
-               ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO144_F412ZG_NF")
-                ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1
-            else()
-                ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2
-            endif()
-
+            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MACv1
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/OTGv1
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RTCv2
@@ -108,22 +93,7 @@
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/EXTIv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2)
-
-if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR
-   ${CHIBIOS_BOARD} STREQUAL "ST_STM32F4_DISCOVERY" OR
-   ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL" OR
-   ${CHIBIOS_BOARD} STREQUAL "NETDUINO3_WIFI" OR
-   ${CHIBIOS_BOARD} STREQUAL "I2M_ELECTRON_NF" OR
-   ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
-   ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F401RE_NF" OR
-   ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF" OR
-   ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF" OR
-   ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO144_F412ZG_NF")
-    list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1)
-else()
-    list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2)
-endif()
-
+list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MACv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/OTGv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RTCv2)


ENH:  Add criteria report, update git tag, and enhance description.

--- Modules/Remote/AdaptiveDenoising.remote.cmake
+++ Modules/Remote/AdaptiveDenoising.remote.cmake
@@ -1,5 +1,60 @@
+#-- # Grading Level Criteria Report
+#-- EVALUATION DATE:
+#-- EVALUATORS:
+#--
+#-- ## Compliance level 5 star (AKA ITK main modules, or remote modules that could become core modules)
+#--   - [ ] Widespread community dependance
+#--   - [ ] Above 90% code coverage
+#--   - [ ] CI dashboards and testing monitored rigorously
+#--   - [ ] Key API features are exposed in wrapping interface
+#--   - [ ] All requirements of Levels 4,3,2,1
+#--
+#-- ## Compliance Level 4 star (Very high-quality code, perhaps small community dependance)
+#--   - [ ] Meets all ITK code style standards
+#--   - [ ] No external requirements beyond those needed by ITK proper
+#--   - [ ] Builds and passes tests on all supported platforms within 1 month of each core tagged release
+#--            - [ ] Windows Shared Library Build with Visual Studio
+#--            - [ ] Mac with clang compiller
+#--            - [ ] Linux with gcc compiler
+#--   - [ ] Active developer community dedicated to maintaining code-base
+#--   - [ ] 75% code coverage demonstrated for testing suite
+#--   - [ ] Continuous integration testing performed
+#--   - [ ] All requirements of Levels 3,2,1
+#--
+#-- ## Compliance Level 3 star (Quality beta code)
+#--   - [ ] API | executable interface is considered mostly stable and feature complete
+#--   - [ ] 10% C0-code coverage demonstrated for testing suite
+#--   - [ ] Some tests exist and pass on at least some platform
+#--   - [ ] All requirements of Levels 2,1
+#--
+#-- ## Compliance Level 2 star (Alpha code feature API development or niche community/exectution environment dependance )
+#--   - [ ] Compiles for at least 1 niche set of execution envirionments, and perhaps others
+#--         (may depend on specific external tools like a java environment, or specific external libraries to work )
+#--   - [ ] All requirements of Levels 1
+#--
+#-- ## Compliance Level 1 star (Pre-alpha features under development and code of unkown quality)
+#--   - [ ] Code complies on at least 1 platform
+#--
+#-- ## Compliance Level 0 star ( Code/Feature of known poor-quality or deprecated status )
+#--   - [ ] Code reviewed and explicitly identified as not recommended for use
+#--
+#-- ### Please document here any justification for the criteria above
+#       Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed
+
 itk_fetch_module(AdaptiveDenoising
-  "A spatially adaptive denoising image filter using non-local means."
-  GIT_REPOSITORY http://github.com/ntustison/ITKAdaptiveDenoising.git
-  GIT_TAG 914e6958a0773e18d6bb45cc5feda72f3180a8ba
-  )
+  "A spatially adaptive denoising image filter using non-local means.
+  A patch-based framework for new ITK functionality: Joint fusion, denoising,
+  and non-local super-resolution.
+  Tustison N., Avants B., Wang H., Xie L., Coupe P., Yushkevich P., Manjon J.
+  Insight Journal.
+  http://insight-journal.org/browse/publication/982.
+  Two Luis Miguel fans walk into a bar in Nagoya ---> (yada, yada, yada)
+  ---> an ITK-implementation of a popular patch-based denoising filter.
+  Tustison N., Manjon J.V.
+  Insight Journal.
+  http://insight-journal.org/browse/publication/979.
+  "
+  MODULE_COMPLIANCE_LEVEL
+  GIT_REPOSITORY ${git_protocol}://github.com/ntustison/ITKAdaptiveDenoising.git
+  GIT_TAG e8adb9cb73e22c1c9adef41e25dd08ec6f287870
+)


fixes findbox2d

fixes findbox2d

--- cmake/FindBox2D.cmake
+++ cmake/FindBox2D.cmake
@@ -1,63 +1,91 @@
-# Locate Box2D
-# This module defines XXX_FOUND, XXX_INCLUDE_DIRS and XXX_LIBRARIES standard variables
+# - Find Box2D
+# Find the native Box2D includes and libraries
+#
+#  BOX2D_INCLUDE_DIR - where to find TmxParser/Config.hpp, etc.
+#  BOX2D_LIBRARIES   - List of libraries when using libTmxParser.
+#  BOX2D_FOUND       - True if libTmxParser found.

-FIND_PATH(BOX2D_INCLUDE_DIR Box2D.h
-    HINTS
-    $ENV{BOX2D_DIR}
-    $ENV{BOX2D_PATH}
-    ${ADDITIONAL_SEARCH_PATHS}
-    PATH_SUFFIXES include Include
-    PATHS
-        ~/Library/Frameworks
-        /Library/Frameworks
-        /usr/local
-        /usr
-        /sw # Fink
-        /opt/local # DarwinPorts
-        /opt/csw # Blastwave
-        /opt
-)
+if(BOX2D_INCLUDE_DIR)
+  # Already in cache, be silent
+  set(BOX2D_FIND_QUIETLY TRUE)
+endif(BOX2D_INCLUDE_DIR)

-FIND_LIBRARY(BOX2D_LIBRARY
-    NAMES box2d
-    HINTS
-    $ENV{BOX2D_DIR}
-    $ENV{BOX2D_PATH}
-    ${ADDITIONAL_SEARCH_PATHS}
-    PATH_SUFFIXES lib64 lib lib/release Library
-    PATHS
-        ~/Library/Frameworks
-        /Library/Frameworks
-        /usr/local
-        /usr
-        /sw
-        /opt/local
-        /opt/csw
-        /opt
-)
+find_path(BOX2D_INCLUDE_DIR Box2D/Box2D.h
+  PATH_SUFFIXES include
+  PATHS
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /usr/local
+  /usr
+  /sw          # Fink
+  /opt/local   # DarwinPorts
+  /opt/csw     # Blastwave
+  /opt
+  ${BOX2DDIR}
+  $ENV{BOX2DDIR})

-FIND_LIBRARY(BOX2D_LIBRARY_DEBUG
-    NAMES box2dd box2d_d
-    HINTS
-    $ENV{BOX2D_DIR}
-    $ENV{BOX2D_PATH}
-    ${ADDITIONAL_SEARCH_PATHS}
-    PATH_SUFFIXES lib64 lib lib/debug Library
-    PATHS
-        ~/Library/Frameworks
-        /Library/Frameworks
-        /usr/local
-        /usr
-        /sw
-        /opt/local
-        /opt/csw
-        /opt
-)
+find_library(BOX2D_LIBRARY_DEBUG
+  Box2D-d
+  PATH_SUFFIXES lib64 lib
+  PATHS
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /usr/local
+  /usr
+  /sw          # Fink
+  /opt/local   # DarwinPorts
+  /opt/csw     # Blastwave
+  /opt
+  ${BOX2DDIR}
+  $ENV{BOX2DDIR})

+find_library(BOX2D_LIBRARY_RELEASE
+  Box2D
+  PATH_SUFFIXES lib64 lib
+  PATHS
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /usr/local
+  /usr
+  /sw          # Fink
+  /opt/local   # DarwinPorts
+  /opt/csw     # Blastwave
+  /opt
+  ${BOX2DDIR}
+  $ENV{BOX2DDIR})

-# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(BOX2D DEFAULT_MSG BOX2D_LIBRARY BOX2D_INCLUDE_DIR)
-INCLUDE(FindPackageTargetLibraries)
-FIND_PACKAGE_SET_STD_INCLUDE_AND_LIBS(BOX2D)
+if(BOX2D_LIBRARY_DEBUG OR BOX2D_LIBRARY_RELEASE)
+  # Library found
+  set(BOX2D_FOUND TRUE)
+
+  # If both were found, set BOX2D_LIBRARY to the release version
+  if(BOX2D_LIBRARY_DEBUG AND BOX2D_LIBRARY_RELEASE)
+    set(BOX2D_LIBRARY ${BOX2D_LIBRARY_RELEASE})
+  endif()
+
+  if(BOX2D_LIBRARY_DEBUG AND NOT BOX2D_LIBRARY_RELEASE)
+    set(BOX2D_LIBRARY ${BOX2D_LIBRARY_DEBUG})
+  endif()
+
+  if(NOT BOX2D_LIBRARY_DEBUG AND BOX2D_LIBRARY_RELEASE)
+    set(BOX2D_LIBRARY ${BOX2D_LIBRARY_RELEASE})
+  endif()
+else()
+  set(BOX2D_FOUND FALSE)
+endif()
+
+# Handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
+# all listed variables are TRUE.
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(BOX2D DEFAULT_MSG BOX2D_LIBRARY BOX2D_INCLUDE_DIR)
+
+if(BOX2D_FOUND)
+  set(BOX2D_LIBRARIES ${BOX2D_LIBRARY})
+else(BOX2D_FOUND)
+  set(BOX2D_LIBRARIES)
+endif(BOX2D_FOUND)
+
+mark_as_advanced(BOX2D_INCLUDE_DIR
+  BOX2D_LIBRARY
+  BOX2D_LIBRARY_RELEASE
+  BOX2D_LIBRARY_DEBUG)


Update indentation

Update indentation

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -4,43 +4,43 @@
 # Locate CEGUI LIBRARIES
 #
 # This module defines
-#  CEGUI_FOUND, if false, do not try to link to CEGUI
-#  CEGUI_INCLUDE_DIR, where to find headers.
-#  CEGUI_LIBRARIES, the LIBRARIES to link against
-#  CEGUI_BINARY_REL - location of the main CEGUI binary (win32 non-static only, release)
-#  CEGUI_BINARY_DBG - location of the main CEGUI binaries (win32 non-static only, debug)
+#    CEGUI_FOUND, if false, do not try to link to CEGUI
+#    CEGUI_INCLUDE_DIR, where to find headers.
+#    CEGUI_LIBRARIES, the LIBRARIES to link against
+#    CEGUI_BINARY_REL - location of the main CEGUI binary (win32 non-static only, release)
+#    CEGUI_BINARY_DBG - location of the main CEGUI binaries (win32 non-static only, debug)
 #
 #
-# 	Modules :
-#  CEGUI_${COMPONENT}_FOUND - ${COMPONENT} is available
-#  CEGUI_${COMPONENT}_INCLUDE_DIRS - additional include directories for ${COMPONENT}
-#  CEGUI_${COMPONENT}_LIBRARIES - link these to use ${COMPONENT}
-#  CEGUI_${COMPONENT}_BINARY_REL - location of the component binary (win32 non-static only, release)
-#  CEGUI_${COMPONENT}_BINARY_DBG - location of the component binary (win32 non-static only, debug)
+#         Modules :
+#    CEGUI_${COMPONENT}_FOUND - ${COMPONENT} is available
+#    CEGUI_${COMPONENT}_INCLUDE_DIRS - additional include directories for ${COMPONENT}
+#    CEGUI_${COMPONENT}_LIBRARIES - link these to use ${COMPONENT}
+#    CEGUI_${COMPONENT}_BINARY_REL - location of the component binary (win32 non-static only, release)
+#    CEGUI_${COMPONENT}_BINARY_DBG - location of the component binary (win32 non-static only, debug)
 #
 # VERSION 0.7.X:
-#	WindowsRenderer:
-#		Falagard
-#	Renderer:
-#		Direct3D9Renderer Direct3D10Renderer Direct3D11Renderer IrrlichtRenderer NullRenderer OgreRenderer OpenGLRenderer
-#	ImageCodec:
-#		CoronaImageCodec DevILImageCodec FreeImageImageCodec SILLYImageCodec STBImageCodec TGAImageCodec
-#	Parser:
-#		ExpatParser LibxmlParser RapidXMLParser TinyXMLParser XercesParser)
-#	Script:
-#		LuaScriptModule toluapp
+#        WindowsRenderer:
+#                Falagard
+#        Renderer:
+#                Direct3D9Renderer Direct3D10Renderer Direct3D11Renderer IrrlichtRenderer NullRenderer OgreRenderer OpenGLRenderer
+#        ImageCodec:
+#                CoronaImageCodec DevILImageCodec FreeImageImageCodec SILLYImageCodec STBImageCodec TGAImageCodec
+#        Parser:
+#                ExpatParser LibxmlParser RapidXMLParser TinyXMLParser XercesParser)
+#        Script:
+#                LuaScriptModule toluapp

 # VERSION 0.8.X:
-#	WindowsRenderer:
-#		CoreWindowRendererSet
-#	Renderer:
-#		Direct3D9Renderer Direct3D10Renderer Direct3D11Renderer IrrlichtRenderer NullRenderer OgreRenderer OpenGLRenderer OpenGL3Renderer OpenGLESRenderer
-#	ImageCodec:
-#		CoronaImageCodec DevILImageCodec FreeImageImageCodec SILLYImageCodec STBImageCodec TGAImageCodec PVRImageCodec
-#	Parser:
-#		ExpatParser LibXMLParser RapidXMLParser TinyXMLParser XercesParser)
-#	Script:
-#		LuaScriptModule
+#        WindowsRenderer:
+#                CoreWindowRendererSet
+#        Renderer:
+#                Direct3D9Renderer Direct3D10Renderer Direct3D11Renderer IrrlichtRenderer NullRenderer OgreRenderer OpenGLRenderer OpenGL3Renderer OpenGLESRenderer
+#        ImageCodec:
+#                CoronaImageCodec DevILImageCodec FreeImageImageCodec SILLYImageCodec STBImageCodec TGAImageCodec PVRImageCodec
+#        Parser:
+#                ExpatParser LibXMLParser RapidXMLParser TinyXMLParser XercesParser)
+#        Script:
+#                LuaScriptModule
 ################################################################################

@@ -48,315 +48,315 @@
 # Get the value of a preprocessor entry
 ################################################################################
 macro(get_preprocessor_entry CONTENTS KEYWORD VARIABLE)
-  string(REGEX MATCH
-    "# *define +${KEYWORD} +((\"([^\n]*)\")|([^ \n]*))"
-    PREPROC_TEMP_VAR
-    ${${CONTENTS}}
-  )
-  if (CMAKE_MATCH_3)
-    set(${VARIABLE} ${CMAKE_MATCH_3})
-  else ()
-    set(${VARIABLE} ${CMAKE_MATCH_4})
-  endif ()
+    string(REGEX MATCH
+        "# *define +${KEYWORD} +((\"([^\n]*)\")|([^ \n]*))"
+        PREPROC_TEMP_VAR
+        ${${CONTENTS}}
+    )
+    if (CMAKE_MATCH_3)
+        set(${VARIABLE} ${CMAKE_MATCH_3})
+    else ()
+        set(${VARIABLE} ${CMAKE_MATCH_4})
+    endif ()
 endmacro()

 ################################################################################
 # Check if exist a preprocessor entry
 ################################################################################
 macro(has_preprocessor_entry CONTENTS KEYWORD VARIABLE)
-  string(REGEX MATCH
-    "\n *# *define +(${KEYWORD})"
-    PREPROC_TEMP_VAR
-    ${${CONTENTS}}
-  )
-  if (CMAKE_MATCH_1)
-    set(${VARIABLE} TRUE)
-  else ()
-    set(${VARIABLE} FALSE)
-  endif ()
+    string(REGEX MATCH
+        "\n *# *define +(${KEYWORD})"
+        PREPROC_TEMP_VAR
+        ${${CONTENTS}}
+    )
+    if (CMAKE_MATCH_1)
+        set(${VARIABLE} TRUE)
+    else ()
+        set(${VARIABLE} FALSE)
+    endif ()
 endmacro()

 ################################################################################
 # Replace the value of a preprocessor entry
 ################################################################################
 macro(replace_preprocessor_entry VARIABLE KEYWORD NEW_VALUE)
-  string(REGEX REPLACE
-    "(// *)?# *define +${KEYWORD} +[^ \n]*"
-	"#define ${KEYWORD} ${NEW_VALUE}"
-	${VARIABLE}_TEMP
-	${${VARIABLE}}
-  )
-  set(${VARIABLE} ${${VARIABLE}_TEMP})
+    string(REGEX REPLACE
+        "(// *)?# *define +${KEYWORD} +[^ \n]*"
+        "#define ${KEYWORD} ${NEW_VALUE}"
+        ${VARIABLE}_TEMP
+        ${${VARIABLE}}
+    )
+    set(${VARIABLE} ${${VARIABLE}_TEMP})
 endmacro()

 ################################################################################
 # Define the value of preprocessor entry
 ################################################################################
 macro(set_preprocessor_entry VARIABLE KEYWORD ENABLE)
-  if (${ENABLE})
-    set(TMP_REPLACE_STR "#define ${KEYWORD}")
-  else ()
-    set(TMP_REPLACE_STR "// #define ${KEYWORD}")
-  endif ()
-  string(REGEX REPLACE
-    "(// *)?# *define +${KEYWORD} *\n"
-	${TMP_REPLACE_STR}
-	${VARIABLE}_TEMP
-	${${VARIABLE}}
-  )
-  set(${VARIABLE} ${${VARIABLE}_TEMP})
+    if (${ENABLE})
+        set(TMP_REPLACE_STR "#define ${KEYWORD}")
+    else ()
+        set(TMP_REPLACE_STR "// #define ${KEYWORD}")
+    endif ()
+    string(REGEX REPLACE
+        "(// *)?# *define +${KEYWORD} *\n"
+        ${TMP_REPLACE_STR}
+        ${VARIABLE}_TEMP
+        ${${VARIABLE}}
+    )
+    set(${VARIABLE} ${${VARIABLE}_TEMP})
 endmacro()
-
+

 ################################################################################
 # Begin processing of package
 ################################################################################
 macro(findpkg_begin PREFIX)
-  if (NOT ${PREFIX}_FIND_QUIETLY)
-    message(STATUS "Looking for ${PREFIX}...")
-  endif ()
+    if (NOT ${PREFIX}_FIND_QUIETLY)
+        message(STATUS "Looking for ${PREFIX}...")
+    endif ()
 endmacro(findpkg_begin)

 ################################################################################
 # Display a status message unless FIND_QUIETLY is set
 ################################################################################
 macro(pkg_message PREFIX)
-  if (NOT ${PREFIX}_FIND_QUIETLY)
-    message(STATUS ${ARGN})
-  endif ()
+    if (NOT ${PREFIX}_FIND_QUIETLY)
+        message(STATUS ${ARGN})
+    endif ()
 endmacro(pkg_message)

 ################################################################################
 # Get environment variable, define it as ENV_$var and make sure backslashes are converted to forward slashes
 ################################################################################
 macro(getenv_path VAR)
-   set(ENV_${VAR} $ENV{${VAR}})
-   # replace won't work if var is blank
-   if (ENV_${VAR})
-     string( REGEX REPLACE "\\\\" "/" ENV_${VAR} ${ENV_${VAR}} )
-   endif ()
+     set(ENV_${VAR} $ENV{${VAR}})
+     # replace won't work if var is blank
+     if (ENV_${VAR})
+         string( REGEX REPLACE "\\\\" "/" ENV_${VAR} ${ENV_${VAR}} )
+     endif ()
 endmacro(getenv_path)

 ################################################################################
 # Construct search paths for includes and libraries from a PREFIX_PATH
 ################################################################################
 macro(create_search_paths PREFIX)
-  foreach(dir ${${PREFIX}_PREFIX_PATH})
-    set(${PREFIX}_INC_SEARCH_PATH ${${PREFIX}_INC_SEARCH_PATH}
-      ${dir}/include ${dir}/Include ${dir}/include/${PREFIX} ${dir}/Headers)
-    set(${PREFIX}_INC_SEARCH_PATH ${${PREFIX}_INC_SEARCH_PATH}
-      ${dir}/${PREFIX}/include ${dir}/${PREFIX}/Include ${dir}/${PREFIX}/include/${PREFIX} ${dir}/${PREFIX}/Headers)
-    set(${PREFIX}_LIB_SEARCH_PATH ${${PREFIX}_LIB_SEARCH_PATH}
-      ${dir}/lib ${dir}/Lib ${dir}/lib/${PREFIX} ${dir}/Libs)
-    set(${PREFIX}_BIN_SEARCH_PATH ${${PREFIX}_BIN_SEARCH_PATH}
-      ${dir}/bin)
-  endforeach(dir)
-  if(ANDROID)
-	set(${PREFIX}_LIB_SEARCH_PATH ${${PREFIX}_LIB_SEARCH_PATH} ${OGRE_DEPENDENCIES_DIR}/lib/${ANDROID_ABI})
-  endif()
-  set(${PREFIX}_FRAMEWORK_SEARCH_PATH ${${PREFIX}_PREFIX_PATH})
+    foreach(dir ${${PREFIX}_PREFIX_PATH})
+        set(${PREFIX}_INC_SEARCH_PATH ${${PREFIX}_INC_SEARCH_PATH}
+            ${dir}/include ${dir}/Include ${dir}/include/${PREFIX} ${dir}/Headers)
+        set(${PREFIX}_INC_SEARCH_PATH ${${PREFIX}_INC_SEARCH_PATH}
+            ${dir}/${PREFIX}/include ${dir}/${PREFIX}/Include ${dir}/${PREFIX}/include/${PREFIX} ${dir}/${PREFIX}/Headers)
+        set(${PREFIX}_LIB_SEARCH_PATH ${${PREFIX}_LIB_SEARCH_PATH}
+            ${dir}/lib ${dir}/Lib ${dir}/lib/${PREFIX} ${dir}/Libs)
+        set(${PREFIX}_BIN_SEARCH_PATH ${${PREFIX}_BIN_SEARCH_PATH}
+            ${dir}/bin)
+    endforeach(dir)
+    if(ANDROID)
+        set(${PREFIX}_LIB_SEARCH_PATH ${${PREFIX}_LIB_SEARCH_PATH} ${OGRE_DEPENDENCIES_DIR}/lib/${ANDROID_ABI})
+    endif()
+    set(${PREFIX}_FRAMEWORK_SEARCH_PATH ${${PREFIX}_PREFIX_PATH})
 endmacro(create_search_paths)

 ################################################################################
 # clear cache variables if a certain variable changed
 ################################################################################
 macro(clear_if_changed TESTVAR)
-  # test against internal check variable
-  # HACK: Apparently, adding a variable to the cache cleans up the list
-  # a bit. We need to also remove any empty strings from the list, but
-  # at the same time ensure that we are actually dealing with a list.
-  list(APPEND ${TESTVAR} "")
-  list(REMOVE_ITEM ${TESTVAR} "")
-  if (NOT "${${TESTVAR}}" STREQUAL "${${TESTVAR}_INT_CHECK}")
-    message(STATUS "${TESTVAR} changed.")
-    foreach(var ${ARGN})
-      set(${var} "NOTFOUND" CACHE STRING "x" FORCE)
-    endforeach(var)
-  endif ()
-  set(${TESTVAR}_INT_CHECK ${${TESTVAR}} CACHE INTERNAL "x" FORCE)
+    # test against internal check variable
+    # HACK: Apparently, adding a variable to the cache cleans up the list
+    # a bit. We need to also remove any empty strings from the list, but
+    # at the same time ensure that we are actually dealing with a list.
+    list(APPEND ${TESTVAR} "")
+    list(REMOVE_ITEM ${TESTVAR} "")
+    if (NOT "${${TESTVAR}}" STREQUAL "${${TESTVAR}_INT_CHECK}")
+        message(STATUS "${TESTVAR} changed.")
+        foreach(var ${ARGN})
+            set(${var} "NOTFOUND" CACHE STRING "x" FORCE)
+        endforeach(var)
+    endif ()
+    set(${TESTVAR}_INT_CHECK ${${TESTVAR}} CACHE INTERNAL "x" FORCE)
 endmacro(clear_if_changed)

 ################################################################################
 # Try to get some hints from pkg-config, if available
 ################################################################################
 macro(use_pkgconfig PREFIX PKGNAME)
-  find_package(PkgConfig)
-  if (PKG_CONFIG_FOUND)
-    pkg_check_modules(${PREFIX} ${PKGNAME} QUIET)
-  endif ()
+    find_package(PkgConfig)
+    if (PKG_CONFIG_FOUND)
+        pkg_check_modules(${PREFIX} ${PKGNAME} QUIET)
+    endif ()
 endmacro (use_pkgconfig)

 ################################################################################
 # Couple a set of release AND debug libraries (or frameworks)
 ################################################################################
 macro(make_library_set PREFIX)
-
-  if (${PREFIX}_FWK)
-    set(${PREFIX} ${${PREFIX}_FWK})
-  elseif (${PREFIX}_REL AND ${PREFIX}_DBG)
-    set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG})
-  elseif (${PREFIX}_REL)
-    set(${PREFIX} ${${PREFIX}_REL})
-  elseif (${PREFIX}_DBG)
-    set(${PREFIX} ${${PREFIX}_DBG})
-  endif ()
+
+    if (${PREFIX}_FWK)
+        set(${PREFIX} ${${PREFIX}_FWK})
+    elseif (${PREFIX}_REL AND ${PREFIX}_DBG)
+        set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG})
+    elseif (${PREFIX}_REL)
+        set(${PREFIX} ${${PREFIX}_REL})
+    elseif (${PREFIX}_DBG)
+        set(${PREFIX} ${${PREFIX}_DBG})
+    endif ()
 endmacro(make_library_set)

 ################################################################################
 # Generate debug names from given release names
 ################################################################################
 macro(get_debug_names PREFIX)
-  foreach(i ${${PREFIX}})
-    set(${PREFIX}_DBG ${${PREFIX}_DBG} ${i}d ${i}D ${i}_d ${i}_D ${i}_debug ${i})
-  endforeach(i)
+    foreach(i ${${PREFIX}})
+        set(${PREFIX}_DBG ${${PREFIX}_DBG} ${i}d ${i}D ${i}_d ${i}_D ${i}_debug ${i})
+    endforeach(i)
 endmacro(get_debug_names)

 ################################################################################
 # Add the parent dir from DIR to VAR
 ################################################################################
 macro(add_parent_dir VAR DIR)
-  get_filename_component(${DIR}_TEMP "${${DIR}}/.." ABSOLUTE)
-  set(${VAR} ${${VAR}} ${${DIR}_TEMP})
+    get_filename_component(${DIR}_TEMP "${${DIR}}/.." ABSOLUTE)
+    set(${VAR} ${${VAR}} ${${DIR}_TEMP})
 endmacro(add_parent_dir)

 ################################################################################
 # Do the final processing for the package find.
 ################################################################################
 macro(findpkg_finish PREFIX)
-  # skip if already processed during this run
-  if (NOT ${PREFIX}_FOUND)
-    if (${PREFIX}_INCLUDE_DIR AND ${PREFIX}_LIBRARY)
-      set(${PREFIX}_FOUND TRUE)
-      set(${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIR})
-      set(${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARY})
-      if (NOT ${PREFIX}_FIND_QUIETLY)
-        message(STATUS "Found ${PREFIX}: ${${PREFIX}_LIBRARIES}")
-      endif ()
-    else ()
-      if (NOT ${PREFIX}_FIND_QUIETLY)
-        message(STATUS "Could not locate ${PREFIX}")
-      endif ()
-      if (${PREFIX}_FIND_REQUIRED)
-        message(FATAL_ERROR "Required library ${PREFIX} not found! Install the library (including dev packages) and try again. If the library is already installed, set the missing variables manually in cmake.")
-      endif ()
-    endif ()
-
-    mark_as_advanced(${PREFIX}_FOUND ${PREFIX}_LIBRARIES ${PREFIX}_INCLUDE_DIRS ${PREFIX}_INCLUDE_DIR ${PREFIX}_LIBRARY ${PREFIX}_LIBRARY_REL ${PREFIX}_LIBRARY_DBG ${PREFIX}_LIBRARY_FWK)
-  endif ()
+    # skip if already processed during this run
+    if (NOT ${PREFIX}_FOUND)
+        if (${PREFIX}_INCLUDE_DIR AND ${PREFIX}_LIBRARY)
+            set(${PREFIX}_FOUND TRUE)
+            set(${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIR})
+            set(${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARY})
+            if (NOT ${PREFIX}_FIND_QUIETLY)
+                message(STATUS "Found ${PREFIX}: ${${PREFIX}_LIBRARIES}")
+            endif ()
+        else ()
+            if (NOT ${PREFIX}_FIND_QUIETLY)
+                message(STATUS "Could not locate ${PREFIX}")
+            endif ()
+            if (${PREFIX}_FIND_REQUIRED)
+                message(FATAL_ERROR "Required library ${PREFIX} not found! Install the library (including dev packages) and try again. If the library is already installed, set the missing variables manually in cmake.")
+            endif ()
+        endif ()
+
+        mark_as_advanced(${PREFIX}_FOUND ${PREFIX}_LIBRARIES ${PREFIX}_INCLUDE_DIRS ${PREFIX}_INCLUDE_DIR ${PREFIX}_LIBRARY ${PREFIX}_LIBRARY_REL ${PREFIX}_LIBRARY_DBG ${PREFIX}_LIBRARY_FWK)
+    endif ()
 endmacro(findpkg_finish)

 #########################################################
 # Find cegui modules
-#########################################################
+#########################################################
 macro(cegui_find_modules PLUGIN_COMPONENT)

-  foreach (comp ${CEGUI_${PLUGIN_COMPONENT}_MODULES})
-
-    set(LIBNAME ${comp})
-    set(HEADER ${CEGUI_${PLUGIN_COMPONENT}_MODULES_${comp}_HEADER})
-    set(PKGCONFIG ${CEGUI_${PLUGIN_COMPONENT}_MODULES_${comp}_PKGCONFIG})
-    set(CHECKNOPREFIX ${CEGUI_${PLUGIN_COMPONENT}_MODULES_${comp}_CHECKNOPREFIX})
-
-    if (NOT "${HEADER}" STREQUAL "")
-
-      findpkg_begin(CEGUI_${comp})
-
-      if(PKGCONFIG)
-        use_pkgconfig(CEGUI_${comp}_PKGC "CEGUI-${PKGCONFIG}")
-        if(NOT CEGUI_${comp}_PKGC_INCLUDE_DIRS AND CEGUI_LIB_SUFFIX)
-          use_pkgconfig(CEGUI_${comp}_PKGC "CEGUI${CEGUI_LIB_SUFFIX}-${PKGCONFIG}")
-        endif()
-      endif()
-
-      list(LENGTH HEADER len)
-      math(EXPR lenmax "${len} - 1")
-
-      foreach(val RANGE ${lenmax})
-        list(GET HEADER ${val} pathHeader)
+    foreach (comp ${CEGUI_${PLUGIN_COMPONENT}_MODULES})
+
+        set(LIBNAME ${comp})
+        set(HEADER ${CEGUI_${PLUGIN_COMPONENT}_MODULES_${comp}_HEADER})
+        set(PKGCONFIG ${CEGUI_${PLUGIN_COMPONENT}_MODULES_${comp}_PKGCONFIG})
+        set(CHECKNOPREFIX ${CEGUI_${PLUGIN_COMPONENT}_MODULES_${comp}_CHECKNOPREFIX})

-        if(CEGUI_${comp}_INCLUDE_DIR)
-          set(CEGUI_${comp}_INCLUDE_DIR_TMP ${CEGUI_${comp}_INCLUDE_DIR})
-          unset(CEGUI_${comp}_INCLUDE_DIR CACHE)
-        endif()
+        if (NOT "${HEADER}" STREQUAL "")

-        get_filename_component(head "${pathHeader}" NAME)
-        get_filename_component(dir "${pathHeader}" DIRECTORY)
-        if (NOT "${dir}" STREQUAL "")
-          set(dir "${dir}/")
+            findpkg_begin(CEGUI_${comp})
+
+            if(PKGCONFIG)
+                use_pkgconfig(CEGUI_${comp}_PKGC "CEGUI-${PKGCONFIG}")
+                if(NOT CEGUI_${comp}_PKGC_INCLUDE_DIRS AND CEGUI_LIB_SUFFIX)
+                    use_pkgconfig(CEGUI_${comp}_PKGC "CEGUI${CEGUI_LIB_SUFFIX}-${PKGCONFIG}")
+                endif()
+            endif()
+
+            list(LENGTH HEADER len)
+            math(EXPR lenmax "${len} - 1")
+
+            foreach(val RANGE ${lenmax})
+                list(GET HEADER ${val} pathHeader)
+
+                if(CEGUI_${comp}_INCLUDE_DIR)
+                    set(CEGUI_${comp}_INCLUDE_DIR_TMP ${CEGUI_${comp}_INCLUDE_DIR})
+                    unset(CEGUI_${comp}_INCLUDE_DIR CACHE)
+                endif()
+
+                get_filename_component(head "${pathHeader}" NAME)
+                get_filename_component(dir "${pathHeader}" DIRECTORY)
+                if (NOT "${dir}" STREQUAL "")
+                    set(dir "${dir}/")
+                endif ()
+
+                find_path(CEGUI_${comp}_INCLUDE_DIR NAMES ${head} HINTS ${CEGUI_INCLUDE_DIRS} ${CEGUI_${comp}_PKGC_INCLUDE_DIRS} PATH_SUFFIXES ${dir} CEGUI/${dir})
+
+                if(CEGUI_${comp}_INCLUDE_DIR_TMP)
+                    set(CEGUI_${comp}_INCLUDE_DIR ${CEGUI_${comp}_INCLUDE_DIR} ${CEGUI_${comp}_INCLUDE_DIR_TMP})
+                    unset(CEGUI_${comp}_INCLUDE_DIR_TMP CACHE)
+                endif()
+
+            endforeach()
+            list(REMOVE_DUPLICATES CEGUI_${comp}_INCLUDE_DIR)
+
+            set(CEGUI_SUBLIB_DIR "cegui-${CEGUI_VERSION_MAJOR}.${CEGUI_VERSION_MINOR}")
+
+
+            set(CEGUI_${comp}_LIBRARY_NAMES "CEGUI${comp}")
+            get_debug_names(CEGUI_${comp}_LIBRARY_NAMES)
+
+            set(CEGUI_${comp}_LIBRARY_NAMES_SUFFIX "CEGUI${comp}${CEGUI_LIB_SUFFIX}")
+            get_debug_names(CEGUI_${comp}_LIBRARY_NAMES_SUFFIX)
+
+            find_library(CEGUI_${comp}_LIBRARY_REL NAMES ${CEGUI_${comp}_LIBRARY_NAMES} ${CEGUI_${comp}_LIBRARY_NAMES_SUFFIX} HINTS ${CEGUI_LIBRARY_DIR_REL} ${CEGUI_LIBRARY_DIR_REL}/${CEGUI_SUBLIB_DIR} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
+            find_library(CEGUI_${comp}_LIBRARY_DBG NAMES ${CEGUI_${comp}_LIBRARY_NAMES_DBG} ${CEGUI_${comp}_LIBRARY_NAMES_SUFFIX_DBG} HINTS ${CEGUI_LIBRARY_DIR_DBG} ${CEGUI_LIBRARY_DIR_DBG}/${CEGUI_SUBLIB_DIR} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Debug")
+
+            if(CHECKNOPREFIX AND (NOT CEGUI_${comp}_LIBRARY_REL OR NOT CEGUI_${comp}_LIBRARY_DBG))
+                set(CEGUI_${comp}_LIBRARY_NAMES "${comp}")
+                get_debug_names(CEGUI_${comp}_LIBRARY_NAMES)
+
+                set(CEGUI_${comp}_LIBRARY_NAMES_SUFFIX "${comp}${CEGUI_LIB_SUFFIX}")
+                get_debug_names(CEGUI_${comp}_LIBRARY_NAMES_SUFFIX)
+
+                find_library(CEGUI_${comp}_LIBRARY_REL NAMES ${CEGUI_${comp}_LIBRARY_NAMES} ${CEGUI_${comp}_LIBRARY_NAMES_SUFFIX} HINTS ${CEGUI_LIBRARY_DIR_REL} ${CEGUI_LIBRARY_DIR_REL}/${CEGUI_SUBLIB_DIR} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
+                find_library(CEGUI_${comp}_LIBRARY_DBG NAMES ${CEGUI_${comp}_LIBRARY_NAMES_DBG} ${CEGUI_${comp}_LIBRARY_NAMES_SUFFIX_DBG} HINTS ${CEGUI_LIBRARY_DIR_DBG} ${CEGUI_LIBRARY_DIR_DBG}/${CEGUI_SUBLIB_DIR} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Debug")
+            endif()
+
+            make_library_set(CEGUI_${comp}_LIBRARY)
+
+            if (NOT CEGUI_STATIC)
+                if (WIN32)
+                    find_file(CEGUI_${comp}_BINARY_REL NAMES "CEGUI${comp}.dll" "CEGUI${comp}${CEGUI_LIB_SUFFIX}.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
+                    find_file(CEGUI_${comp}_BINARY_DBG NAMES "CEGUI${comp}_d.dll" "CEGUI${comp}${CEGUI_LIB_SUFFIX}_d.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Debug")
+
+                     if(CHECKNOPREFIX AND (NOT CEGUI_${comp}_LIBRARY_REL OR NOT CEGUI_${comp}_LIBRARY_DBG))
+                         find_file(CEGUI_${comp}_BINARY_REL NAMES "${comp}${CEGUI_LIB_SUFFIX}.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
+                         find_file(CEGUI_${comp}_BINARY_DBG NAMES "${comp}${CEGUI_LIB_SUFFIX}_d.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} PATH_SUFFIXES "" "Debug")
+                    endif()
+                endif()
+
+                get_filename_component(CEGUI_${comp}_BINARY_DIR_REL "${CEGUI_${comp}_BINARY_REL}" PATH)
+                get_filename_component(CEGUI_${comp}_BINARY_DIR_DBG "${CEGUI_${comp}_BINARY_DBG}" PATH)
+                mark_as_advanced(CEGUI_${comp}_BINARY_REL CEGUI_${comp}_BINARY_DBG CEGUI_${comp}_BINARY_DIR_REL CEGUI_${comp}_BINARY_DIR_DBG)
+            endif()
+
+            findpkg_finish(CEGUI_${comp})
+
         endif ()

-        find_path(CEGUI_${comp}_INCLUDE_DIR NAMES ${head} HINTS ${CEGUI_INCLUDE_DIRS} ${CEGUI_${comp}_PKGC_INCLUDE_DIRS} PATH_SUFFIXES ${dir} CEGUI/${dir})
-
-        if(CEGUI_${comp}_INCLUDE_DIR_TMP)
-          set(CEGUI_${comp}_INCLUDE_DIR ${CEGUI_${comp}_INCLUDE_DIR} ${CEGUI_${comp}_INCLUDE_DIR_TMP})
-          unset(CEGUI_${comp}_INCLUDE_DIR_TMP CACHE)
-        endif()
-
-      endforeach()
-      list(REMOVE_DUPLICATES CEGUI_${comp}_INCLUDE_DIR)
-
-      set(CEGUI_SUBLIB_DIR "cegui-${CEGUI_VERSION_MAJOR}.${CEGUI_VERSION_MINOR}")
-
-
-      set(CEGUI_${comp}_LIBRARY_NAMES "CEGUI${comp}")
-      get_debug_names(CEGUI_${comp}_LIBRARY_NAMES)
-
-      set(CEGUI_${comp}_LIBRARY_NAMES_SUFFIX "CEGUI${comp}${CEGUI_LIB_SUFFIX}")
-      get_debug_names(CEGUI_${comp}_LIBRARY_NAMES_SUFFIX)
-
-      find_library(CEGUI_${comp}_LIBRARY_REL NAMES ${CEGUI_${comp}_LIBRARY_NAMES} ${CEGUI_${comp}_LIBRARY_NAMES_SUFFIX} HINTS ${CEGUI_LIBRARY_DIR_REL} ${CEGUI_LIBRARY_DIR_REL}/${CEGUI_SUBLIB_DIR} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
-      find_library(CEGUI_${comp}_LIBRARY_DBG NAMES ${CEGUI_${comp}_LIBRARY_NAMES_DBG} ${CEGUI_${comp}_LIBRARY_NAMES_SUFFIX_DBG} HINTS ${CEGUI_LIBRARY_DIR_DBG} ${CEGUI_LIBRARY_DIR_DBG}/${CEGUI_SUBLIB_DIR} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Debug")
-
-      if(CHECKNOPREFIX AND (NOT CEGUI_${comp}_LIBRARY_REL OR NOT CEGUI_${comp}_LIBRARY_DBG))
-        set(CEGUI_${comp}_LIBRARY_NAMES "${comp}")
-        get_debug_names(CEGUI_${comp}_LIBRARY_NAMES)
-
-        set(CEGUI_${comp}_LIBRARY_NAMES_SUFFIX "${comp}${CEGUI_LIB_SUFFIX}")
-        get_debug_names(CEGUI_${comp}_LIBRARY_NAMES_SUFFIX)
-
-        find_library(CEGUI_${comp}_LIBRARY_REL NAMES ${CEGUI_${comp}_LIBRARY_NAMES} ${CEGUI_${comp}_LIBRARY_NAMES_SUFFIX} HINTS ${CEGUI_LIBRARY_DIR_REL} ${CEGUI_LIBRARY_DIR_REL}/${CEGUI_SUBLIB_DIR} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
-        find_library(CEGUI_${comp}_LIBRARY_DBG NAMES ${CEGUI_${comp}_LIBRARY_NAMES_DBG} ${CEGUI_${comp}_LIBRARY_NAMES_SUFFIX_DBG} HINTS ${CEGUI_LIBRARY_DIR_DBG} ${CEGUI_LIBRARY_DIR_DBG}/${CEGUI_SUBLIB_DIR} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Debug")
-      endif()
-
-      make_library_set(CEGUI_${comp}_LIBRARY)
-
-      if (NOT CEGUI_STATIC)
-        if (WIN32)
-          find_file(CEGUI_${comp}_BINARY_REL NAMES "CEGUI${comp}.dll" "CEGUI${comp}${CEGUI_LIB_SUFFIX}.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
-          find_file(CEGUI_${comp}_BINARY_DBG NAMES "CEGUI${comp}_d.dll" "CEGUI${comp}${CEGUI_LIB_SUFFIX}_d.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} ${CEGUI_${comp}_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" "Debug")
-
-           if(CHECKNOPREFIX AND (NOT CEGUI_${comp}_LIBRARY_REL OR NOT CEGUI_${comp}_LIBRARY_DBG))
-             find_file(CEGUI_${comp}_BINARY_REL NAMES "${comp}${CEGUI_LIB_SUFFIX}.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
-             find_file(CEGUI_${comp}_BINARY_DBG NAMES "${comp}${CEGUI_LIB_SUFFIX}_d.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} PATH_SUFFIXES "" "Debug")
-          endif()
-        endif()
-
-        get_filename_component(CEGUI_${comp}_BINARY_DIR_REL "${CEGUI_${comp}_BINARY_REL}" PATH)
-        get_filename_component(CEGUI_${comp}_BINARY_DIR_DBG "${CEGUI_${comp}_BINARY_DBG}" PATH)
-        mark_as_advanced(CEGUI_${comp}_BINARY_REL CEGUI_${comp}_BINARY_DBG CEGUI_${comp}_BINARY_DIR_REL CEGUI_${comp}_BINARY_DIR_DBG)
-      endif()
-
-      findpkg_finish(CEGUI_${comp})
-
-    endif ()
-
-  endforeach (comp)
-
+    endforeach (comp)
+
 endmacro(cegui_find_modules)

 #########################################################
 # register a module
-#########################################################
+#########################################################
 macro(cegui_register_module TYPE LIBNAME HEADER PKGCONFIG)
-    set(CEGUI_MODULES ${CEGUI_MODULES} ${LIBNAME})
-    set(CEGUI_${TYPE}_MODULES ${CEGUI_${TYPE}_MODULES} ${LIBNAME})
-    set(CEGUI_${TYPE}_MODULES_${LIBNAME}_HEADER ${HEADER})
-    if(NOT "${PKGCONFIG}" STREQUAL "")
-      set(CEGUI_${TYPE}_MODULES_${LIBNAME}_PKGCONFIG ${PKGCONFIG})
-    endif()
+        set(CEGUI_MODULES ${CEGUI_MODULES} ${LIBNAME})
+        set(CEGUI_${TYPE}_MODULES ${CEGUI_${TYPE}_MODULES} ${LIBNAME})
+        set(CEGUI_${TYPE}_MODULES_${LIBNAME}_HEADER ${HEADER})
+        if(NOT "${PKGCONFIG}" STREQUAL "")
+            set(CEGUI_${TYPE}_MODULES_${LIBNAME}_PKGCONFIG ${PKGCONFIG})
+        endif()
 endmacro()

@@ -387,46 +387,46 @@

 # Determine whether to search for a dynamic or static build
 if (CEGUI_STATIC)
-  set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD "${CMAKE_FIND_LIBRARY_SUFFIXES}")
-  if (WIN32)
-    set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll")
-  else()
-    set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so")
-  endif()
+    set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD "${CMAKE_FIND_LIBRARY_SUFFIXES}")
+    if (WIN32)
+        set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll")
+    else()
+        set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so")
+    endif()
 endif ()

 # construct search paths from environmental hints and
 # OS specific guesses
 if (WIN32)
-  set(CEGUI_PREFIX_GUESSES
-    ${ENV_PROGRAMFILES}/cegui
-    ${ENV_PROGRAMFILES}/CEGUI
-    C:/CEGUI-SDK
-    C:/lib/cegui
-    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;CEGUI_HOME]
-    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;CEGUI_DIR]
-    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;CEGUI_ROOT]
-  )
+    set(CEGUI_PREFIX_GUESSES
+        ${ENV_PROGRAMFILES}/cegui
+        ${ENV_PROGRAMFILES}/CEGUI
+        C:/CEGUI-SDK
+        C:/lib/cegui
+        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;CEGUI_HOME]
+        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;CEGUI_DIR]
+        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;CEGUI_ROOT]
+    )
 elseif (UNIX)
-  set(CEGUI_PREFIX_GUESSES
-    /opt/cegui
-    /opt/CEGUI
-    /usr
-    /usr/local
-    $ENV{HOME}/cegui
-    $ENV{HOME}/CEGUI
-  )
-  if (APPLE)
-    set(CEGUI_PREFIX_GUESSES
-      ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx
-      ${CEGUI_PREFIX_GUESSES}
+    set(CEGUI_PREFIX_GUESSES
+        /opt/cegui
+        /opt/CEGUI
+        /usr
+        /usr/local
+        $ENV{HOME}/cegui
+        $ENV{HOME}/CEGUI
     )
-  endif ()
+    if (APPLE)
+        set(CEGUI_PREFIX_GUESSES
+            ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx
+            ${CEGUI_PREFIX_GUESSES}
+        )
+    endif ()
 endif ()

 set(CEGUI_PREFIX_PATH
-	$ENV{CEGUI_HOME} $ENV{CEGUI_DIR} $ENV{CEGUI_ROOT}
-	${CEGUI_PREFIX_GUESSES}
+        $ENV{CEGUI_HOME} $ENV{CEGUI_DIR} $ENV{CEGUI_ROOT}
+        ${CEGUI_PREFIX_GUESSES}
 )

 # Construct search paths for includes and libraries
@@ -444,32 +444,32 @@

 set(CEGUI_INCOMPATIBLE FALSE)
 if (CEGUI_INCLUDE_DIR)
-  # determine CEGUI version
-  if(CEGUI_CONFIG_INCLUDE_DIR_PREFIX)
-    file(READ ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h CEGUI_TEMP_VERSION_CONTENT)
-  else()
-    file(READ ${CEGUI_INCLUDE_DIR}/Version.h CEGUI_TEMP_VERSION_CONTENT)
-  endif()
-
-  if (NOT "${CEGUI_TEMP_VERSION_CONTENT}" STREQUAL "")
-    get_preprocessor_entry(CEGUI_TEMP_VERSION_CONTENT CEGUI_VERSION_MAJOR CEGUI_VERSION_MAJOR)
-    get_preprocessor_entry(CEGUI_TEMP_VERSION_CONTENT CEGUI_VERSION_MINOR CEGUI_VERSION_MINOR)
-    get_preprocessor_entry(CEGUI_TEMP_VERSION_CONTENT CEGUI_VERSION_PATCH CEGUI_VERSION_PATCH)
-    get_preprocessor_entry(CEGUI_TEMP_VERSION_CONTENT CEGUI_VERSION_NAME CEGUI_VERSION_NAME)
-    set(CEGUI_VERSION "${CEGUI_VERSION_MAJOR}.${CEGUI_VERSION_MINOR}.${CEGUI_VERSION_PATCH}")
-    pkg_message(CEGUI "Found CEGUI ${CEGUI_VERSION_NAME} (${CEGUI_VERSION})")
-  else()
-    message(SEND_ERROR "Can't found CEGUI version !")
+    # determine CEGUI version
+    if(CEGUI_CONFIG_INCLUDE_DIR_PREFIX)
+        file(READ ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h CEGUI_TEMP_VERSION_CONTENT)
+    else()
+        file(READ ${CEGUI_INCLUDE_DIR}/Version.h CEGUI_TEMP_VERSION_CONTENT)
+    endif()
+
+    if (NOT "${CEGUI_TEMP_VERSION_CONTENT}" STREQUAL "")
+        get_preprocessor_entry(CEGUI_TEMP_VERSION_CONTENT CEGUI_VERSION_MAJOR CEGUI_VERSION_MAJOR)
+        get_preprocessor_entry(CEGUI_TEMP_VERSION_CONTENT CEGUI_VERSION_MINOR CEGUI_VERSION_MINOR)
+        get_preprocessor_entry(CEGUI_TEMP_VERSION_CONTENT CEGUI_VERSION_PATCH CEGUI_VERSION_PATCH)
+        get_preprocessor_entry(CEGUI_TEMP_VERSION_CONTENT CEGUI_VERSION_NAME CEGUI_VERSION_NAME)
+        set(CEGUI_VERSION "${CEGUI_VERSION_MAJOR}.${CEGUI_VERSION_MINOR}.${CEGUI_VERSION_PATCH}")
+        pkg_message(CEGUI "Found CEGUI ${CEGUI_VERSION_NAME} (${CEGUI_VERSION})")
+    else()
+        message(SEND_ERROR "Can't found CEGUI version !")
+        set(CEGUI_INCOMPATIBLE FALSE)
+    endif()
+
+else ()
     set(CEGUI_INCOMPATIBLE FALSE)
-  endif()
-
-else ()
-  set(CEGUI_INCOMPATIBLE FALSE)
 endif ()

 if ("${CEGUI_VERSION}" VERSION_GREATER "0.8.0")
-  set(CEGUI_LIB_SUFFIX "-${CEGUI_VERSION_MAJOR}")
+    set(CEGUI_LIB_SUFFIX "-${CEGUI_VERSION_MAJOR}")
 endif ()

@@ -481,7 +481,7 @@

 if (CEGUI_INCOMPATIBLE)
-  set(CEGUI_LIBRARY "NOTFOUND")
+    set(CEGUI_LIBRARY "NOTFOUND")
 endif ()

 set(CEGUI_INCLUDE_DIR ${CEGUI_CONFIG_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR})
@@ -493,7 +493,7 @@
 mark_as_advanced(CEGUI_CONFIG_INCLUDE_DIR)

 if (NOT CEGUI_FOUND)
-  return()
+    return()
 endif ()

@@ -504,93 +504,93 @@

 # find binaries
 if (NOT CEGUI_STATIC)
-	if (WIN32)
-		find_file(CEGUI_BINARY_REL NAMES "CEGUIBase${CEGUI_LIB_SUFFIX}.dll" "CEGUIBase.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
-		find_file(CEGUI_BINARY_DBG NAMES "CEGUIBase${CEGUI_LIB_SUFFIX}_d.dll" "CEGUIBase_d.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} PATH_SUFFIXES "" "Debug")
-	endif()
-
-	get_filename_component(CEGUI_BINARY_DIR_REL "${CEGUI_BINARY_REL}" PATH)
-	get_filename_component(CEGUI_BINARY_DIR_DBG "${CEGUI_BINARY_DBG}" PATH)
-	mark_as_advanced(CEGUI_BINARY_REL CEGUI_BINARY_DBG CEGUI_BINARY_DIR_REL CEGUI_BINARY_DIR_DBG)
+        if (WIN32)
+                find_file(CEGUI_BINARY_REL NAMES "CEGUIBase${CEGUI_LIB_SUFFIX}.dll" "CEGUIBase.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
+                find_file(CEGUI_BINARY_DBG NAMES "CEGUIBase${CEGUI_LIB_SUFFIX}_d.dll" "CEGUIBase_d.dll" HINTS ${CEGUI_BIN_SEARCH_PATH} PATH_SUFFIXES "" "Debug")
+        endif()
+
+        get_filename_component(CEGUI_BINARY_DIR_REL "${CEGUI_BINARY_REL}" PATH)
+        get_filename_component(CEGUI_BINARY_DIR_DBG "${CEGUI_BINARY_DBG}" PATH)
+        mark_as_advanced(CEGUI_BINARY_REL CEGUI_BINARY_DBG CEGUI_BINARY_DIR_REL CEGUI_BINARY_DIR_DBG)
 endif()

 if ("${CEGUI_VERSION}" VERSION_GREATER "0.8.0")
-  #Base
-  cegui_register_module(BASE CommonDialogs CommonDialogs/Module.h "")
-
-  #WindowsRenderer
-  cegui_register_module(WINDOWSRENDERER CoreWindowRendererSet WindowRendererSets/Core/Module.h "")
-
-  #Renderer
-  cegui_register_module(RENDERER Direct3D9Renderer RendererModules/Direct3D9/Renderer.h "")
-  cegui_register_module(RENDERER Direct3D10Renderer RendererModules/Direct3D10/Renderer.h "")
-  cegui_register_module(RENDERER Direct3D11Renderer RendererModules/Direct3D11/Renderer.h "")
-  cegui_register_module(RENDERER DirectFBRenderer RendererModules/DirectFB/Renderer.h "")
-  cegui_register_module(RENDERER IrrlichtRenderer RendererModules/Irrlicht/Renderer.h "IRRLICHT")
-  cegui_register_module(RENDERER NullRenderer RendererModules/Null/Renderer.h "NULL")
-  cegui_register_module(RENDERER OgreRenderer RendererModules/Ogre/Renderer.h "OGRE")
-  cegui_register_module(RENDERER OpenGLRenderer RendererModules/OpenGL/GLRenderer.h "OPENGL")
-  cegui_register_module(RENDERER OpenGL3Renderer RendererModules/OpenGL/GL3Renderer.h "OPENGL3")
-  cegui_register_module(RENDERER OpenGLESRenderer RendererModules/OpenGLES/Renderer.h "")
-
-  #ImageCodec
-  cegui_register_module(IMAGECODEC CoronaImageCodec ImageCodecModules/Corona/ImageCodec.h "")
-  cegui_register_module(IMAGECODEC DevILImageCodec ImageCodecModules/DevIL/ImageCodec.h "")
-  cegui_register_module(IMAGECODEC FreeImageImageCodec ImageCodecModules/FreeImage/ImageCodec.h "")
-  cegui_register_module(IMAGECODEC SILLYImageCodec ImageCodecModules/SILLY/ImageCodec.h "")
-  cegui_register_module(IMAGECODEC STBImageCodec ImageCodecModules/STB/ImageCodec.h "")
-  cegui_register_module(IMAGECODEC TGAImageCodec ImageCodecModules/TGA/ImageCodec.h "")
-  cegui_register_module(IMAGECODEC PVRImageCodec ImageCodecModules/PVR/ImageCodec.h "")
-
-  #Parser
-  cegui_register_module(PARSER ExpatParser XMLParserModules/Expat/XMLParser.h "")
-  cegui_register_module(PARSER LibXMLParser XMLParserModules/Libxml2/XMLParser.h "")
-  cegui_register_module(PARSER RapidXMLParser XMLParserModules/RapidXML/XMLParser.h "")
-  cegui_register_module(PARSER TinyXMLParser XMLParserModules/TinyXML/XMLParser.h "")
-  cegui_register_module(PARSER XercesParser XMLParserModules/Xerces/XMLParser.h "")
-
-  #Script
-  cegui_register_module(SCRIPT LuaScriptModule ScriptModules/Lua/ScriptModule.h "LUA")
-
+    #Base
+    cegui_register_module(BASE CommonDialogs CommonDialogs/Module.h "")
+
+    #WindowsRenderer
+    cegui_register_module(WINDOWSRENDERER CoreWindowRendererSet WindowRendererSets/Core/Module.h "")
+
+    #Renderer
+    cegui_register_module(RENDERER Direct3D9Renderer RendererModules/Direct3D9/Renderer.h "")
+    cegui_register_module(RENDERER Direct3D10Renderer RendererModules/Direct3D10/Renderer.h "")
+    cegui_register_module(RENDERER Direct3D11Renderer RendererModules/Direct3D11/Renderer.h "")
+    cegui_register_module(RENDERER DirectFBRenderer RendererModules/DirectFB/Renderer.h "")
+    cegui_register_module(RENDERER IrrlichtRenderer RendererModules/Irrlicht/Renderer.h "IRRLICHT")
+    cegui_register_module(RENDERER NullRenderer RendererModules/Null/Renderer.h "NULL")
+    cegui_register_module(RENDERER OgreRenderer RendererModules/Ogre/Renderer.h "OGRE")
+    cegui_register_module(RENDERER OpenGLRenderer RendererModules/OpenGL/GLRenderer.h "OPENGL")
+    cegui_register_module(RENDERER OpenGL3Renderer RendererModules/OpenGL/GL3Renderer.h "OPENGL3")
+    cegui_register_module(RENDERER OpenGLESRenderer RendererModules/OpenGLES/Renderer.h "")
+
+    #ImageCodec
+    cegui_register_module(IMAGECODEC CoronaImageCodec ImageCodecModules/Corona/ImageCodec.h "")
+    cegui_register_module(IMAGECODEC DevILImageCodec ImageCodecModules/DevIL/ImageCodec.h "")
+    cegui_register_module(IMAGECODEC FreeImageImageCodec ImageCodecModules/FreeImage/ImageCodec.h "")
+    cegui_register_module(IMAGECODEC SILLYImageCodec ImageCodecModules/SILLY/ImageCodec.h "")
+    cegui_register_module(IMAGECODEC STBImageCodec ImageCodecModules/STB/ImageCodec.h "")
+    cegui_register_module(IMAGECODEC TGAImageCodec ImageCodecModules/TGA/ImageCodec.h "")
+    cegui_register_module(IMAGECODEC PVRImageCodec ImageCodecModules/PVR/ImageCodec.h "")
+
+    #Parser
+    cegui_register_module(PARSER ExpatParser XMLParserModules/Expat/XMLParser.h "")
+    cegui_register_module(PARSER LibXMLParser XMLParserModules/Libxml2/XMLParser.h "")
+    cegui_register_module(PARSER RapidXMLParser XMLParserModules/RapidXML/XMLParser.h "")
+    cegui_register_module(PARSER TinyXMLParser XMLParserModules/TinyXML/XMLParser.h "")
+    cegui_register_module(PARSER XercesParser XMLParserModules/Xerces/XMLParser.h "")
+
+    #Script
+    cegui_register_module(SCRIPT LuaScriptModule ScriptModules/Lua/ScriptModule.h "LUA")
+
 else ()
-
-  #WindowsRenderer
-  cegui_register_module(WINDOWSRENDERER FalagardWRBase "WindowRendererSets/Falagard/FalModule.h;falagard/CEGUIFalNamedArea.h" "")
-
-  #Renderer
-  cegui_register_module(RENDERER Direct3D9Renderer RendererModules/Direct3D9/CEGUIDirect3D9Renderer.h "")
-  cegui_register_module(RENDERER Direct3D10Renderer RendererModules/Direct3D10/CEGUIDirect3D10Renderer.h "")
-  cegui_register_module(RENDERER Direct3D11Renderer RendererModules/Direct3D11/CEGUIDirect3D11Renderer.h "")
-  cegui_register_module(RENDERER DirectFBRenderer RendererModules/DirectFB/CEGUIDirectFBRenderer.h "")
-  cegui_register_module(RENDERER IrrlichtRenderer RendererModules/Irrlicht/CEGUIIrrlichtRenderer.h "")
-  cegui_register_module(RENDERER NullRenderer RendererModules/Null/CEGUINullRenderer.h "NULL")
-  cegui_register_module(RENDERER OgreRenderer RendererModules/Ogre/CEGUIOgreRenderer.h "OGRE")
-  cegui_register_module(RENDERER OpenGLRenderer RendererModules/OpenGL/CEGUIOpenGLRenderer.h "OPENGL")
-
-  #ImageCodec
-  cegui_register_module(IMAGECODEC CoronaImageCodec ImageCodecModules/CoronaImageCodec/CEGUICoronaImageCodec.h "")
-  cegui_register_module(IMAGECODEC DevILImageCodec ImageCodecModules/DevILImageCodec/CEGUIDevILImageCodec.h "")
-  cegui_register_module(IMAGECODEC FreeImageImageCodec ImageCodecModules/FreeImageImageCodec/CEGUIFreeImageImageCodec.h "")
-  cegui_register_module(IMAGECODEC SILLYImageCodec ImageCodecModules/SILLYImageCodec/CEGUISILLYImageCodec.h "")
-  cegui_register_module(IMAGECODEC STBImageCodec ImageCodecModules/STBImageCodec/CEGUISTBImageCodec.h "")
-  cegui_register_module(IMAGECODEC TGAImageCodec ImageCodecModules/TGAImageCodec/CEGUITGAImageCodec.h "")
-
-  #Parser
-  cegui_register_module(PARSER ExpatParser XMLParserModules/ExpatParser/CEGUIExpatParser.h "")
-  cegui_register_module(PARSER LibxmlParser XMLParserModules/LibxmlParser/CEGUILibxmlParser.h "")
-  cegui_register_module(PARSER RapidXMLParser XMLParserModules/RapidXMLParser/CEGUIRapidXMLParser.h "")
-  cegui_register_module(PARSER TinyXMLParser XMLParserModules/TinyXMLParser/CEGUITinyXMLParser.h "")
-  cegui_register_module(PARSER XercesParser XMLParserModules/XercesParser/CEGUIXercesParser.h "")
-
-  #Script
-  cegui_register_module(SCRIPT LuaScriptModule ScriptingModules/LuaScriptModule/CEGUILua.h "")
-
-  if(WIN32)
-    cegui_register_module(SCRIPT tolua++ ScriptingModules/LuaScriptModule/support/tolua++/tolua++.h "")
-    set(CEGUI_SCRIPT_MODULES_tolua++_CHECKNOPREFIX TRUE)
-  else()
-    cegui_register_module(SCRIPT toluapp ScriptingModules/LuaScriptModule/support/tolua++/tolua++.h "")
-  endif()
+
+    #WindowsRenderer
+    cegui_register_module(WINDOWSRENDERER FalagardWRBase "WindowRendererSets/Falagard/FalModule.h;falagard/CEGUIFalNamedArea.h" "")
+
+    #Renderer
+    cegui_register_module(RENDERER Direct3D9Renderer RendererModules/Direct3D9/CEGUIDirect3D9Renderer.h "")
+    cegui_register_module(RENDERER Direct3D10Renderer RendererModules/Direct3D10/CEGUIDirect3D10Renderer.h "")
+    cegui_register_module(RENDERER Direct3D11Renderer RendererModules/Direct3D11/CEGUIDirect3D11Renderer.h "")
+    cegui_register_module(RENDERER DirectFBRenderer RendererModules/DirectFB/CEGUIDirectFBRenderer.h "")
+    cegui_register_module(RENDERER IrrlichtRenderer RendererModules/Irrlicht/CEGUIIrrlichtRenderer.h "")
+    cegui_register_module(RENDERER NullRenderer RendererModules/Null/CEGUINullRenderer.h "NULL")
+    cegui_register_module(RENDERER OgreRenderer RendererModules/Ogre/CEGUIOgreRenderer.h "OGRE")
+    cegui_register_module(RENDERER OpenGLRenderer RendererModules/OpenGL/CEGUIOpenGLRenderer.h "OPENGL")
+
+    #ImageCodec
+    cegui_register_module(IMAGECODEC CoronaImageCodec ImageCodecModules/CoronaImageCodec/CEGUICoronaImageCodec.h "")
+    cegui_register_module(IMAGECODEC DevILImageCodec ImageCodecModules/DevILImageCodec/CEGUIDevILImageCodec.h "")
+    cegui_register_module(IMAGECODEC FreeImageImageCodec ImageCodecModules/FreeImageImageCodec/CEGUIFreeImageImageCodec.h "")
+    cegui_register_module(IMAGECODEC SILLYImageCodec ImageCodecModules/SILLYImageCodec/CEGUISILLYImageCodec.h "")
+    cegui_register_module(IMAGECODEC STBImageCodec ImageCodecModules/STBImageCodec/CEGUISTBImageCodec.h "")
+    cegui_register_module(IMAGECODEC TGAImageCodec ImageCodecModules/TGAImageCodec/CEGUITGAImageCodec.h "")
+
+    #Parser
+    cegui_register_module(PARSER ExpatParser XMLParserModules/ExpatParser/CEGUIExpatParser.h "")
+    cegui_register_module(PARSER LibxmlParser XMLParserModules/LibxmlParser/CEGUILibxmlParser.h "")
+    cegui_register_module(PARSER RapidXMLParser XMLParserModules/RapidXMLParser/CEGUIRapidXMLParser.h "")
+    cegui_register_module(PARSER TinyXMLParser XMLParserModules/TinyXMLParser/CEGUITinyXMLParser.h "")
+    cegui_register_module(PARSER XercesParser XMLParserModules/XercesParser/CEGUIXercesParser.h "")
+
+    #Script
+    cegui_register_module(SCRIPT LuaScriptModule ScriptingModules/LuaScriptModule/CEGUILua.h "")
+
+    if(WIN32)
+        cegui_register_module(SCRIPT tolua++ ScriptingModules/LuaScriptModule/support/tolua++/tolua++.h "")
+        set(CEGUI_SCRIPT_MODULES_tolua++_CHECKNOPREFIX TRUE)
+    else()
+        cegui_register_module(SCRIPT toluapp ScriptingModules/LuaScriptModule/support/tolua++/tolua++.h "")
+    endif()

 endif ()

@@ -598,10 +598,10 @@
 #Register var to check change on modules
 set(CEGUI_RESET_MODULES_VARS "")
 foreach (comp ${CEGUI_MODULES})
-  set(CEGUI_RESET_MODULES_VARS ${CEGUI_RESET_MODULES_VARS}
-    CEGUI_${comp}_INCLUDE_DIR CEGUI_${comp}_LIBRARY_FWK
-    CEGUI_${comp}_LIBRARY_DBG CEGUI_${comp}_LIBRARY_REL
-  )
+    set(CEGUI_RESET_MODULES_VARS ${CEGUI_RESET_MODULES_VARS}
+        CEGUI_${comp}_INCLUDE_DIR CEGUI_${comp}_LIBRARY_FWK
+        CEGUI_${comp}_LIBRARY_DBG CEGUI_${comp}_LIBRARY_REL
+    )
 endforeach (comp)
 set(CEGUI_PREFIX_MODULES_WATCH ${CEGUI_PREFIX_MODULES_PATH})
 clear_if_changed(CEGUI_PREFIX_WATCH ${CEGUI_RESET_MODULES_VARS})
@@ -618,7 +618,7 @@

 #Find modules
 if (CEGUI_STATIC)
-  set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES_OLD}")
+    set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES_OLD}")
 endif()


bugfix: cmake did not abort when hwloc was not found

--- cmake/FindHWLOC.cmake
+++ cmake/FindHWLOC.cmake
@@ -1,4 +1,6 @@
 include(LibFindMacros)

-libfind_pkg_check_modules(HWLOC hwloc)
+libfind_pkg_check_modules(HWLOC_PKGCONF hwloc)
+find_path(HWLOC_INCLUDE_DIR NAMES hwloc.h PATHS ${HWLOC_PKGCONF_INCLUDE_DIRS})
+set(HWLOC_PROCESS_INCLUDES HWLOC_INCLUDE_DIR)
 libfind_process(HWLOC)


Add support to specify location of matio library via env variable MATIO_HOME

--- cmake/FindMatio.cmake
+++ cmake/FindMatio.cmake
@@ -4,9 +4,9 @@
 #
 # Once done this will define:
 #
-#  MATIO_FOUND		- True if MATIO found.
-#  MATIO_LIBRARIES	- MATIO libraries.
-#  MATIO_INCLUDE_DIRS - where to find matio.h, etc..
+#  MATIO_FOUND          - True if MATIO found.
+#  MATIO_LIBRARIES      - MATIO libraries.
+#  MATIO_INCLUDE_DIRS   - where to find matio.h, etc..
 #  MATIO_VERSION_STRING - version number as a string (e.g.: "1.3.4")
 #
 #=============================================================================
@@ -45,42 +45,44 @@

 # Look for the header file.
 find_path(MATIO_INCLUDE_DIR NAMES matio.h PATHS ENV C_INCLUDE_PATH)
+find_path(MATIO_INCLUDE_DIR NAMES matio.h HINTS ${MATIO_HOME}/include)

 # Look for the library.
 find_library(MATIO_LIBRARY NAMES matio PATHS ENV LD_LIBRARY_PATH)
+find_library(MATIO_LIBRARY NAMES matio HINTS ${MATIO_HOME}/lib)

 if(MATIO_INCLUDE_DIR)
-	# ---------------------------------------------------
-	#  Extract version information from MATIO
-	# ---------------------------------------------------
+  # ---------------------------------------------------
+  #  Extract version information from MATIO
+  # ---------------------------------------------------

-	# If the file is missing, set all values to 0
-	set(MATIO_MAJOR_VERSION 0)
-	set(MATIO_MINOR_VERSION 0)
-	set(MATIO_RELEASE_LEVEL 0)
+  # If the file is missing, set all values to 0
+  set(MATIO_MAJOR_VERSION 0)
+  set(MATIO_MINOR_VERSION 0)
+  set(MATIO_RELEASE_LEVEL 0)

-	# new versions of MATIO have `matio_pubconf.h`
-	if(EXISTS ${MATIO_INCLUDE_DIR}/matio_pubconf.h)
-		set(MATIO_CONFIG_FILE "matio_pubconf.h")
-	else()
-		set(MATIO_CONFIG_FILE "matioConfig.h")
-	endif()
+  # new versions of MATIO have `matio_pubconf.h`
+  if(EXISTS ${MATIO_INCLUDE_DIR}/matio_pubconf.h)
+    set(MATIO_CONFIG_FILE "matio_pubconf.h")
+  else()
+    set(MATIO_CONFIG_FILE "matioConfig.h")
+  endif()

-	if(MATIO_CONFIG_FILE)
+  if(MATIO_CONFIG_FILE)

-		# Read and parse MATIO config header file for version number
-		file(STRINGS "${MATIO_INCLUDE_DIR}/${MATIO_CONFIG_FILE}" _matio_HEADER_CONTENTS REGEX "#define MATIO_((MAJOR|MINOR)_VERSION)|(RELEASE_LEVEL) ")
+    # Read and parse MATIO config header file for version number
+    file(STRINGS "${MATIO_INCLUDE_DIR}/${MATIO_CONFIG_FILE}" _matio_HEADER_CONTENTS REGEX "#define MATIO_((MAJOR|MINOR)_VERSION)|(RELEASE_LEVEL) ")

-		foreach(line ${_matio_HEADER_CONTENTS})
-			if(line MATCHES "#define ([A-Z_]+) ([0-9]+)")
-				set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
-			endif()
-		endforeach()
+    foreach(line ${_matio_HEADER_CONTENTS})
+      if(line MATCHES "#define ([A-Z_]+) ([0-9]+)")
+        set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+      endif()
+    endforeach()

-		unset(_matio_HEADER_CONTENTS)
-	endif()
+    unset(_matio_HEADER_CONTENTS)
+  endif()

-	set(MATIO_VERSION_STRING "${MATIO_MAJOR_VERSION}.${MATIO_MINOR_VERSION}.${MATIO_RELEASE_LEVEL}")
+  set(MATIO_VERSION_STRING "${MATIO_MAJOR_VERSION}.${MATIO_MINOR_VERSION}.${MATIO_RELEASE_LEVEL}")
 endif ()

 #==================


Update FindQJSON.cmake to the latest version.

fixes #12

--- cmake/FindQJSON.cmake
+++ cmake/FindQJSON.cmake
@@ -17,25 +17,23 @@
     # use pkg-config to get the values of QJSON_INCLUDE_DIRS
     # and QJSON_LIBRARY_DIRS to add as hints to the find commands.
     include (FindPkgConfig)
-    pkg_check_modules (QJSON QJson>=0.5)
+    pkg_check_modules (PC_QJSON QJson>=0.5)
   endif (NOT WIN32)

   find_library (QJSON_LIBRARIES
     NAMES
     qjson
     PATHS
-    ${QJSON_LIBRARY_DIRS}
+    ${PC_QJSON_LIBRARY_DIRS}
     ${LIB_INSTALL_DIR}
     ${KDE4_LIB_DIR}
   )

   find_path (QJSON_INCLUDE_DIR
     NAMES
-    parser.h
-    PATH_SUFFIXES
-    qjson
+    qjson/parser.h
     PATHS
-    ${QJSON_INCLUDE_DIRS}
+    ${PC_QJSON_INCLUDE_DIRS}
     ${INCLUDE_INSTALL_DIR}
     ${KDE4_INCLUDE_DIR}
   )


uploading findaruco.cmake

uploading findaruco.cmake

--- cmake/Findaruco.cmake
+++ cmake/Findaruco.cmake
@@ -19,16 +19,4 @@
 #      - aruco_VERSION_PATCH : Patch version part of VERSION. Example: "0"
 #
 # ===================================================================================
-INCLUDE_DIRECTORIES("/usr/local/include")
-SET(aruco_INCLUDE_DIRS "/usr/local/include")
-
-LINK_DIRECTORIES("/usr/local/lib")
-SET(aruco_LIB_DIR "/usr/local/lib")
-
-SET(aruco_LIBS opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_cvv;opencv_datasets;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_img_hash;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_reg;opencv_rgbd;opencv_saliency;opencv_sfm;opencv_stereo;opencv_structured_light;opencv_surface_matching;opencv_text;opencv_tracking;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto aruco)
-
-SET(aruco_FOUND 1)
-SET(aruco_VERSION        2.0.9)
-SET(aruco_VERSION_MAJOR  2)
-SET(aruco_VERSION_MINOR  0)
-SET(aruco_VERSION_PATCH  9)
+message(FATAL_ERROR "Error: Replace the file rgbd_rtk/cmake/Findaruco.cmake by the one generated by the compilation of ARUCO in your machine.")


Modernize UsePython.cmake to use package Python3 not PythonInterp

--- cmake/UsePython.cmake
+++ cmake/UsePython.cmake
@@ -33,7 +33,7 @@
 macro(_py_compile_one _INPUT _OUTPUT _TARGET _PYFLAGS)
 	add_custom_command(
 		OUTPUT "${_OUTPUT}"
-		COMMAND "${PYTHON_EXECUTABLE}" ${_PYFLAGS}
+		COMMAND "${Python3_EXECUTABLE}" ${_PYFLAGS}
 			"${USE_PYTHON_MODULE_DIR}/use_python_compile.py" "${_INPUT}" "${_OUTPUT}"
 		MAIN_DEPENDENCY "${_INPUT}"
 		COMMENT "Precompiling Python file '${_TARGET}'"
@@ -54,7 +54,7 @@
 		VERBATIM)
 	add_custom_command(
 		OUTPUT "${_DIR}/.py_compile.done" "${_DIR}/.py_compile.done.PHONY"
-		COMMAND "${PYTHON_EXECUTABLE}" ${_PYFLAGS}
+		COMMAND "${Python3_EXECUTABLE}" ${_PYFLAGS}
 				"${USE_PYTHON_MODULE_DIR}/use_python_compile.py" "${_DIR}"
 		DEPENDS "${_DIR}/.py_compile"
 		COMMENT "Precompiling Python module '${_DIR}'"
@@ -64,8 +64,7 @@
 		PROPERTIES SYMBOLIC ON)
 endmacro(_py_compile_dir)

-set(Python_ADDITIONAL_VERSIONS 3.5 3.4)
-find_package(PythonInterp 3.6 REQUIRED)
+find_package(Python3 3.6 REQUIRED)

 function(py_compile)
 	cmake_parse_arguments(pyc
@@ -227,7 +226,7 @@
 	add_custom_command(OUTPUT ${pyr_OUTPUT} TARGET ${pyr_TARGET}
 		DEPENDS ${pyr_DEPENDS}
 		COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=${pp}"
-			"${PYTHON_EXECUTABLE}" ${pyflags} ${cmd})
+			"${Python3_EXECUTABLE}" ${pyflags} ${cmd})
 endfunction(py_run)

@@ -285,5 +284,5 @@
 	# message(STATUS "cmd: ${cmd}")
 	add_test(NAME "${pyt_NAME}"
 		COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=${pp}"
-			"${PYTHON_EXECUTABLE}" ${pyflags} ${cmd})
+			"${Python3_EXECUTABLE}" ${pyflags} ${cmd})
 endfunction(py_test)


cmake intel compiler option

cmake intel compiler option

--- cmake/compilers.cmake
+++ cmake/compilers.cmake
@@ -1,9 +1,9 @@
 if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
   if(WIN32)
-    add_compile_options(/arch:native)
+    add_compile_options(/QxHost)
     string(APPEND CMAKE_Fortran_FLAGS " /warn:declarations /heap-arrays")
   else()
-    add_compile_options(-march=native)
+    add_compile_options(-xHost)
     string(APPEND CMAKE_Fortran_FLAGS " -warn declarations")
     string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -check all -fpe0 -warn -traceback -debug extended")
   endif()