summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 83af0f6..162b23e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,8 +19,14 @@ PROJECT(uSCXML)
#################################################
# where to find more cmake scripts
-set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/contrib/cmake)
-include("${CMAKE_MODULE_PATH}/USCXMLMacros.cmake")
+list (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/contrib/cmake")
+
+# add modules that were introduced with later cmake versions if possible
+if (CMAKE_VERSION LESS 3.0.0)
+ list (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/contrib/cmake/3.0.0")
+endif()
+
+include("${PROJECT_SOURCE_DIR}/contrib/cmake/USCXMLMacros.cmake")
# use folders in the IDEs for the various targets
set_property(GLOBAL PROPERTY USE_FOLDERS ON)