summaryrefslogtreecommitdiffstats
path: root/contrib/cmake/FindUMUNDO.cmake
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-11-07 22:20:09 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-11-07 22:20:09 (GMT)
commitda08a1d3c3bca8070c9b029cfc1f8faf9e34dd25 (patch)
treeb285148ab6ca415814d9370148f91736f83c852c /contrib/cmake/FindUMUNDO.cmake
parent0ae6c27d9322208053033d9b19c0ffffed3d99eb (diff)
downloaduscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.zip
uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.tar.gz
uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.tar.bz2
Committing local version again
Diffstat (limited to 'contrib/cmake/FindUMUNDO.cmake')
-rw-r--r--contrib/cmake/FindUMUNDO.cmake36
1 files changed, 25 insertions, 11 deletions
diff --git a/contrib/cmake/FindUMUNDO.cmake b/contrib/cmake/FindUMUNDO.cmake
index 06df54a..2bf9701 100644
--- a/contrib/cmake/FindUMUNDO.cmake
+++ b/contrib/cmake/FindUMUNDO.cmake
@@ -25,6 +25,16 @@ set(_UMUNDO_LIB_SEARCHPATH
"/usr/local"
"/opt/local"
"C:/Program Files (x86)/uMundo"
+ "C:/Program Files/uMundo"
+)
+
+###################################################
+# find the umundo header files
+###################################################
+FIND_PATH(UMUNDO_INCLUDE_DIR umundo/core.h
+ PATH_SUFFIXES include
+ PATHS ${_UMUNDO_LIB_SEARCHPATH}
+ ENV UMUNDO_INCLUDE_DIR
)
###################################################
@@ -35,17 +45,16 @@ 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
-)
+# is the convenience library requested?
+list(FIND _UMUNDO_COMPONENTS_TO_PROCESS "CONVENIENCE" FOUND_ITEM)
+if (FOUND_ITEM GREATER -1)
+ set(_UMUNDO_COMPONENTS_TO_PROCESS "CONVENIENCE")
+else()
+ list(APPEND _UMUNDO_COMPONENTS_TO_PROCESS "CORE")
+endif()
+
+list(REMOVE_DUPLICATES _UMUNDO_COMPONENTS_TO_PROCESS)
###################################################
# iterate components and try to find libraries
@@ -56,7 +65,12 @@ FIND_PATH(UMUNDO_INCLUDE_DIR umundo/core.h
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)
+
+ if (_UMUNDO_COMPONENT STREQUAL "CONVENIENCE")
+ STRING(TOLOWER "${64BIT_LIB_POSTFIX}" _UMUNDO_COMPONENT_LC)
+ else()
+ STRING(TOLOWER ${_UMUNDO_COMPONENT}${64BIT_LIB_POSTFIX} _UMUNDO_COMPONENT_LC)
+ endif()
# prefer MinSizeRel libraries
FIND_LIBRARY(${_CURR_COMPONENT}