Re: [hatari-devel] Small CMAKE diff

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On Fri, Jan 25, 2019 at 3:09 AM Thorsten Otto <admin@xxxxxxxxxxx> wrote:
On Donnerstag, 24. Januar 2019 20:21:51 CET Christer Solskogen wrote:
> SDL.h is the same for both, so it works just fine:

??? Yes its almost identical, but it is just a wrapper for other include
files. Those will also be taken from /usr/include/SDL. So you are using SDL
headers, but SDL2 library. I doubt that this is what is was intended.


It will not, because the cross compiler will only use the one in $SYSROOT.
Without SDL2/SDL.h in ${CROSS_COMPILER_PREFIX}/mingw/include, cmake will complain like this:
-- The C compiler identification is GNU 8.2.1
-- Check for working C compiler: /tmp/obj/cross-mingw-w64/bin/x86_64-w64-mingw32-gcc
-- Check for working C compiler: /tmp/obj/cross-mingw-w64/bin/x86_64-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test MUDFLAP_AVAILABLE
-- Performing Test MUDFLAP_AVAILABLE - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Could NOT find SDL2 (missing: SDL2_INCLUDE_DIR)
-- Could NOT find SDL (missing: SDL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:118 (message):
  SDL library not found!

Even if I have /usr/include/SDL2 (for the host machine)



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/