Compiling and installing library from source

Get support for Unvanquished.
Post Reply
User avatar
JOURNEYMAN
Dragoon
Posts: 342
Joined: Thu Mar 08, 2012 9:42 pm UTC

Compiling and installing library from source

Post by JOURNEYMAN »

Does compiling and installing library files from the source code also generate developer files for that library?
Apparently OpenSuSE 12.3 doesn't have SDL2 and I had to download the source code from the development site and compile it (SDL2-2.0.1). After installing the library, I still get the following error. I'm assuming this is due to the lack of development files for SDL2 library?

-- git reported v0.22.1-36-g4b99e75
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 (message):
Could NOT find SDL2 (missing: SDL2_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
cmake/FindSDL2.cmake:179 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:1039 (find_package)

-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1

User avatar
Amanieu
Programmer
Posts: 44
Joined: Sun Jun 16, 2013 8:28 pm UTC

Re: Compiling and installing library from source

Post by Amanieu »

Use cmake options to override the location of the SDL2 library
cmake -DSDL2_LIBRARY="/path/to/libSDL2.so" -DSDL2_INCLUDE_DIR="/path/to/include/SDL2"

User avatar
Ishq
Project Head
Posts: 1152
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Compiling and installing library from source

Post by Ishq »

You can still use SDL1.2 if you set the option in CMake.

Post Reply