+find_path (APITRACE_SOURCE_DIR NAMES cmake/FindDirectX.cmake PATHS .. ../.. DOC "apitrace source tree" NO_DEFAULT_PATH)
+if (NOT EXISTS ${APITRACE_SOURCE_DIR})
+ message (WARNING "Please specify path to apitrace source tree via APITRACE_SOURCE_DIR")
+endif ()
+
+find_program (APITRACE_EXECUTABLE NAMES apitrace PATHS ${APITRACE_SOURCE_DIR} DOC "apitrace executable")
+if (NOT EXISTS ${APITRACE_EXECUTABLE})
+ message (WARNING "Please specify path to apitrace executable via APITRACE_EXECUTABLE")
+endif ()
+
+include (FindPythonInterp)
+include (FindPkgConfig)
+
+set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+
+# Set default built type
+if (NOT CMAKE_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE Debug
+ CACHE
+ STRING "Choose the build type, options are: None, Debug, Release, RelWithDebInfo, or MinSizeRel."
+ FORCE)
+endif (NOT CMAKE_BUILD_TYPE)
+
+include (CMakeParseArguments)
+
+find_package (OpenGL)