summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-10-05 15:31:26 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-10-05 15:31:26 (GMT)
commit0ae6c27d9322208053033d9b19c0ffffed3d99eb (patch)
tree0794b4df38568e03fb01e7fa91e6d4a625db859e /contrib
parent64cc2ce105cf57fcba637b309664b4bc74ae7d82 (diff)
downloaduscxml-0ae6c27d9322208053033d9b19c0ffffed3d99eb.zip
uscxml-0ae6c27d9322208053033d9b19c0ffffed3d99eb.tar.gz
uscxml-0ae6c27d9322208053033d9b19c0ffffed3d99eb.tar.bz2
Implemented DOM
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cmake/FindMiles.cmake116
-rw-r--r--contrib/cmake/FindUMUNDO.cmake112
2 files changed, 228 insertions, 0 deletions
diff --git a/contrib/cmake/FindMiles.cmake b/contrib/cmake/FindMiles.cmake
new file mode 100644
index 0000000..3166050
--- /dev/null
+++ b/contrib/cmake/FindMiles.cmake
@@ -0,0 +1,116 @@
+# - Find Miles
+# This module checks if Miles is installed and determines where the
+# include files and libraries are. This code sets the following
+# variables:
+#
+# MILES_INCLUDE_DIR = The full path to the miles headers
+# MILES_LIBRARIES = All miles libraries for release and debug builds
+#
+# Example:
+# find_package(MILES REQUIRED audio network)
+# include_directories(${MILES_INCLUDE_DIR})
+#
+
+# is this a 64Bit host?
+# if (NOT APPLE)
+# if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+# set(_MILES_64BIT_LIB_POSTFIX 64)
+# else()
+# set(_MILES_64BIT_LIB_POSTFIX "")
+# endif()
+# endif()
+
+###################################################
+# where to search for miles headers and libraries
+###################################################
+set(_MILES_LIB_SEARCHPATH
+ "/usr/local"
+ "/opt/local"
+ "C:/Program Files (x86)/miles"
+ "C:/Program Files/miles"
+)
+
+###################################################
+# get a list of components the user requested
+###################################################
+set(_MILES_COMPONENTS_TO_PROCESS)
+foreach(_MILES_COMPONENT ${MILES_FIND_COMPONENTS})
+ STRING(TOUPPER ${_MILES_COMPONENT} _MILES_COMPONENT_UC)
+ list(APPEND _MILES_COMPONENTS_TO_PROCESS ${_MILES_COMPONENT_UC})
+endforeach()
+list(APPEND _MILES_COMPONENTS_TO_PROCESS "CORE")
+list(REMOVE_DUPLICATES _MILES_COMPONENTS_TO_PROCESS)
+
+###################################################
+# find the miles header files
+###################################################
+FIND_PATH(MILES_INCLUDE_DIR miles/miles.h
+ PATH_SUFFIXES include
+ PATHS ${_MILES_LIB_SEARCHPATH}
+ ENV MILES_INCLUDE_DIR
+)
+
+###################################################
+# iterate components and try to find libraries
+# in debug and release configuration. For release
+# we prefer MinSizeRel, for debug we prefer
+# RelWithDebInfo.
+###################################################
+SET(MILES_LIBRARIES)
+foreach (_MILES_COMPONENT ${_MILES_COMPONENTS_TO_PROCESS})
+ SET(_CURR_COMPONENT "MILES_${_MILES_COMPONENT}_LIBRARY")
+ STRING(TOLOWER ${_MILES_COMPONENT}${_MILES_64BIT_LIB_POSTFIX} _MILES_COMPONENT_LC)
+
+ # prefer MinSizeRel libraries
+ FIND_LIBRARY(${_CURR_COMPONENT}
+ PATH_SUFFIXES lib
+ NAMES miles_${_MILES_COMPONENT_LC}_s
+ PATHS ${_MILES_LIB_SEARCHPATH}
+ ENV MILES_LIB_DIR
+ )
+ if (${_CURR_COMPONENT})
+ list(APPEND MILES_LIBRARIES optimized ${${_CURR_COMPONENT}})
+ else()
+ # if no minsize libraries were found try normal release
+ FIND_LIBRARY(${_CURR_COMPONENT}
+ PATH_SUFFIXES lib
+ NAMES miles_${_MILES_COMPONENT_LC}
+ PATHS ${_MILES_LIB_SEARCHPATH}
+ ENV MILES_LIB_DIR
+ )
+ if (${_CURR_COMPONENT})
+ list(APPEND MILES_LIBRARIES optimized ${${_CURR_COMPONENT}})
+ endif()
+ endif()
+
+ # prefer RelWithDebInfo libraries
+ FIND_LIBRARY(${_CURR_COMPONENT}_DEBUG
+ PATH_SUFFIXES lib
+ NAMES miles_${_MILES_COMPONENT_LC}_rd
+ PATHS ${_MILES_LIB_SEARCHPATH}
+ ENV MILES_LIB_DIR
+ )
+ if (${_CURR_COMPONENT}_DEBUG)
+ list(APPEND MILES_LIBRARIES debug ${${_CURR_COMPONENT}_DEBUG})
+ else()
+ message("Searching miles_${_MILES_COMPONENT_LC}_d")
+ FIND_LIBRARY(${_CURR_COMPONENT}_DEBUG
+ PATH_SUFFIXES lib
+ NAMES miles_${_MILES_COMPONENT_LC}_d
+ PATHS ${_MILES_LIB_SEARCHPATH}
+ ENV MILES_LIB_DIR
+ )
+ if (${_CURR_COMPONENT}_DEBUG)
+ list(APPEND MILES_LIBRARIES debug ${${_CURR_COMPONENT}_DEBUG})
+ endif()
+ endif()
+
+ if (NOT ${_CURR_COMPONENT} AND NOT ${_CURR_COMPONENT}_DEBUG)
+ message(FATAL_ERROR "Could not find miles component ${_MILES_COMPONENT}")
+ endif()
+endforeach()
+
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(MILES DEFAULT_MSG MILES_LIBRARIES MILES_INCLUDE_DIR)
+MARK_AS_ADVANCED(MILES_INCLUDE_DIR MILES_LIBRARIES)
diff --git a/contrib/cmake/FindUMUNDO.cmake b/contrib/cmake/FindUMUNDO.cmake
new file mode 100644
index 0000000..06df54a
--- /dev/null
+++ b/contrib/cmake/FindUMUNDO.cmake
@@ -0,0 +1,112 @@
+# - Find UMUNDO
+# This module checks if UMundo is installed and determines where the
+# include files and libraries are. This code sets the following
+# variables:
+#
+# UMUNDO_INCLUDE_DIR = The full path to the umundo headers
+# UMUNDO_LIBRARIES = All umundo libraries for release and debug builds
+#
+# Example:
+# find_package(UMUNDO REQUIRED util serial rpc)
+# include_directories(${UMUNDO_INCLUDE_DIR})
+#
+
+# is this a 64Bit host?
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(64BIT_LIB_POSTFIX 64)
+else()
+ set(64BIT_LIB_POSTFIX "")
+endif()
+
+###################################################
+# where to search for umundo headers and libraries
+###################################################
+set(_UMUNDO_LIB_SEARCHPATH
+ "/usr/local"
+ "/opt/local"
+ "C:/Program Files (x86)/uMundo"
+)
+
+###################################################
+# get a list of components the user requested
+###################################################
+set(_UMUNDO_COMPONENTS_TO_PROCESS)
+foreach(_UMUNDO_COMPONENT ${UMUNDO_FIND_COMPONENTS})
+ STRING(TOUPPER ${_UMUNDO_COMPONENT} _UMUNDO_COMPONENT_UC)
+ list(APPEND _UMUNDO_COMPONENTS_TO_PROCESS ${_UMUNDO_COMPONENT_UC})
+endforeach()
+list(APPEND _UMUNDO_COMPONENTS_TO_PROCESS "CORE")
+list(REMOVE_DUPLICATES _UMUNDO_COMPONENTS_TO_PROCESS)
+
+###################################################
+# find the umundo header files
+###################################################
+FIND_PATH(UMUNDO_INCLUDE_DIR umundo/core.h
+ PATH_SUFFIXES include
+ PATHS ${_UMUNDO_LIB_SEARCHPATH}
+ ENV UMUNDO_INCLUDE_DIR
+)
+
+###################################################
+# iterate components and try to find libraries
+# in debug and release configuration. For release
+# we prefer MinSizeRel, for debug we prefer
+# RelWithDebInfo.
+###################################################
+SET(UMUNDO_LIBRARIES)
+foreach (_UMUNDO_COMPONENT ${_UMUNDO_COMPONENTS_TO_PROCESS})
+ SET(_CURR_COMPONENT "UMUNDO_${_UMUNDO_COMPONENT}_LIBRARY")
+ STRING(TOLOWER ${_UMUNDO_COMPONENT}${64BIT_LIB_POSTFIX} _UMUNDO_COMPONENT_LC)
+
+ # prefer MinSizeRel libraries
+ FIND_LIBRARY(${_CURR_COMPONENT}
+ PATH_SUFFIXES lib
+ NAMES umundo${_UMUNDO_COMPONENT_LC}_s
+ PATHS ${_UMUNDO_LIB_SEARCHPATH}
+ ENV UMUNDO_LIB_DIR
+ )
+ if (${_CURR_COMPONENT})
+ list(APPEND UMUNDO_LIBRARIES optimized ${${_CURR_COMPONENT}})
+ else()
+ # if no minsize libraries were found try normal release
+ FIND_LIBRARY(${_CURR_COMPONENT}
+ PATH_SUFFIXES lib
+ NAMES umundo${_UMUNDO_COMPONENT_LC}
+ PATHS ${_UMUNDO_LIB_SEARCHPATH}
+ ENV UMUNDO_LIB_DIR
+ )
+ if (${_CURR_COMPONENT})
+ list(APPEND UMUNDO_LIBRARIES optimized ${${_CURR_COMPONENT}})
+ endif()
+ endif()
+
+ # prefer RelWithDebInfo libraries
+ FIND_LIBRARY(${_CURR_COMPONENT}_DEBUG
+ PATH_SUFFIXES lib
+ NAMES umundo${_UMUNDO_COMPONENT_LC}_rd
+ PATHS ${_UMUNDO_LIB_SEARCHPATH}
+ ENV UMUNDO_LIB_DIR
+ )
+ if (${_CURR_COMPONENT}_DEBUG)
+ list(APPEND UMUNDO_LIBRARIES debug ${${_CURR_COMPONENT}_DEBUG})
+ else()
+ FIND_LIBRARY(${_CURR_COMPONENT}_DEBUG
+ PATH_SUFFIXES lib
+ NAMES umundo${_UMUNDO_COMPONENT_LC}_d
+ PATHS ${_UMUNDO_LIB_SEARCHPATH}
+ ENV UMUNDO_LIB_DIR
+ )
+ if (${_CURR_COMPONENT}_DEBUG)
+ list(APPEND UMUNDO_LIBRARIES debug ${${_CURR_COMPONENT}_DEBUG})
+ endif()
+ endif()
+
+ if (NOT ${_CURR_COMPONENT} AND NOT ${_CURR_COMPONENT}_DEBUG)
+ message(FATAL_ERROR "Could not find umundo component ${_UMUNDO_COMPONENT}")
+ endif()
+endforeach()
+
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMUNDO DEFAULT_MSG UMUNDO_LIBRARIES UMUNDO_INCLUDE_DIR)
+MARK_AS_ADVANCED(UMUNDO_INCLUDE_DIR UMUNDO_LIBRARIES)