Question

I'm building OpenHEVC (https://github.com/OpenHEVC/openHEVC) with cmake on windows 7 to a VS2010 project.

In the CMakeLists.txt at the root directory, I find the line:

include_directories(. ${SDL_INCLUDE_DIR} wrapper_hm/src/Lib)

The "${SDL_INCLUDE_DIR}" I think should be the SDL library(http://www.libsdl.org/download-1.2.php).

My problem is, after downloading SDL library and setting up a new environment variable called "SDL_INCLUDE_DIR" Containing SDL's path (I can "echo %SDL_INCLUDE_DIR%" in a commandline). CMake just keeps giving me this (even after restart Cmake):

''' CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: SDL_INCLUDE_DIR used as include directory in directory C:/Users/Administrator/Desktop/Pure265/openHEVC-master/openHEVC-master used as include directory in directory C:/Users/Administrator/Desktop/Pure265/openHEVC-master/openHEVC-master/wrapper_hm

Configuring incomplete, errors occurred! '''

I'm confused why cmake can't find the environment variable. ( I'm new to Cmake, But I checked it here : http://www.cmake.org/Wiki/CMake_Useful_Variables That ${SDL_INCLUDE_DIR} should be reflected to the env variables. )

Was it helpful?

Solution

${SDL_INCLUDE_DIR} is not an environment variable. It is simply a CMake variable that probably gets set in FindSDL.cmake script. You can see that because environment variables have $ENV{variable_name} sintax.

You should install a development version of SDL library. If you look into FindSDL.cmake script you will see where the script searches for header and lib files. As far as I can tell you have to set SDLDIR environment variable to point to the root folder of SDL library.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top