X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=blobdiff_plain;f=CMakeLists.txt;h=cd7f9d114453ba84dc6a11b4434f614370746e9c;hp=e8820c23936f5b67ccb400819e15b2bb3613c11b;hb=1017d793714f4d3d2fe2b4d29e1eaf564d5db855;hpb=956433aa964937908b070c5f0ce9d8465e3751da diff --git a/CMakeLists.txt b/CMakeLists.txt index e8820c2..cd7f9d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ 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 @@ -18,6 +20,12 @@ find_package (GLUT) find_path (GLEW_INCLUDE_DIR GL/glew.h /usr/include/GL) find_library (GLEW_glew_LIBRARY GLEW /usr/lib) +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) endif (UNIX) @@ -56,14 +64,10 @@ if (MSVC) add_definitions (-wd4244) # conversion' conversion from 'type1' to 'type2', possible loss of data endif () -if (NOT APITRACE_BINARY_DIR) - set (APITRACE_BINARY_DIR "${CMAKE_BINARY_DIR}/.." CACHE PATH "apitrace build directory") -endif () -if (NOT EXISTS ${APITRACE_BINARY_DIR}) - message (SEND_ERROR "Invalid APITRACE_BINARY_DIR") -endif () +find_program (APITRACE_EXECUTABLE apitrace DOC "apitrace executable") enable_testing() add_subdirectory (apps) +add_subdirectory (traces)