X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=blobdiff_plain;f=CMakeLists.txt;h=cd7f9d114453ba84dc6a11b4434f614370746e9c;hp=f69714af88f1010536d51f36d3cd8a085411c74a;hb=276ee5387182ca865c00500013877b6cc2d5c77e;hpb=accd3917f73ef5e77541d7125041cf8361fbe899 diff --git a/CMakeLists.txt b/CMakeLists.txt index f69714a..cd7f9d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,16 +2,29 @@ cmake_minimum_required (VERSION 2.8) project (apitrace-tests) +include (FindPkgConfig) + +# 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 REQUIRED) find_package (GLUT) -find_library (GLEW_glew_LIBRARY GLEW - /usr/lib -) +find_path (GLEW_INCLUDE_DIR GL/glew.h /usr/include/GL) +find_library (GLEW_glew_LIBRARY GLEW /usr/lib) -find_path (GLEW_INCLUDE_DIR GL/glew.h - /usr/include/GL -) +if (NOT WIN32) + pkg_check_modules (EGL egl) + pkg_check_modules (GLESV1 glesv1_cm) + pkg_check_modules (GLESV2 glesv2) +endif () if (UNIX) link_libraries(m) @@ -51,11 +64,10 @@ if (MSVC) add_definitions (-wd4244) # conversion' conversion from 'type1' to 'type2', possible loss of data endif () - -set (APITRACE_BINARY_DIR "${CMAKE_BINARY_DIR}/.." CACHE PATH "apitrace build directory") - +find_program (APITRACE_EXECUTABLE apitrace DOC "apitrace executable") enable_testing() add_subdirectory (apps) +add_subdirectory (traces)