cmake/sdlchecks.cmake
changeset 11851 8f295e7acefd
parent 11848 2f157c1ca383
child 11867 4e7f7e186d27
equal deleted inserted replaced
11850:8d97fd557ba1 11851:8f295e7acefd
  1130     pkg_check_modules(VIDEO_RPI bcm_host brcmegl)
  1130     pkg_check_modules(VIDEO_RPI bcm_host brcmegl)
  1131     if (NOT VIDEO_RPI_FOUND)
  1131     if (NOT VIDEO_RPI_FOUND)
  1132       set(VIDEO_RPI_INCLUDE_DIRS "/opt/vc/include" "/opt/vc/include/interface/vcos/pthreads" "/opt/vc/include/interface/vmcs_host/linux/" )
  1132       set(VIDEO_RPI_INCLUDE_DIRS "/opt/vc/include" "/opt/vc/include/interface/vcos/pthreads" "/opt/vc/include/interface/vmcs_host/linux/" )
  1133       set(VIDEO_RPI_LIBRARY_DIRS "/opt/vc/lib" )
  1133       set(VIDEO_RPI_LIBRARY_DIRS "/opt/vc/lib" )
  1134       set(VIDEO_RPI_LIBRARIES bcm_host )
  1134       set(VIDEO_RPI_LIBRARIES bcm_host )
       
  1135       set(VIDEO_RPI_LDFLAGS "-Wl,-rpath,/opt/vc/lib")
  1135     endif()
  1136     endif()
  1136     listtostr(VIDEO_RPI_INCLUDE_DIRS VIDEO_RPI_INCLUDE_FLAGS "-I")
  1137     listtostr(VIDEO_RPI_INCLUDE_DIRS VIDEO_RPI_INCLUDE_FLAGS "-I")
  1137     listtostr(VIDEO_RPI_LIBRARY_DIRS VIDEO_RPI_LIBRARY_FLAGS "-L")
  1138     listtostr(VIDEO_RPI_LIBRARY_DIRS VIDEO_RPI_LIBRARY_FLAGS "-L")
  1138 
  1139 
  1139     set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
  1140     set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
  1150       set(SDL_VIDEO_DRIVER_RPI 1)
  1151       set(SDL_VIDEO_DRIVER_RPI 1)
  1151       file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
  1152       file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
  1152       set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_RPI_SOURCES})
  1153       set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_RPI_SOURCES})
  1153       list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
  1154       list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
  1154       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
  1155       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
       
  1156       list(APPEND EXTRA_LDFLAGS ${VIDEO_RPI_LDFLAGS})
  1155     endif(SDL_VIDEO AND HAVE_VIDEO_RPI)
  1157     endif(SDL_VIDEO AND HAVE_VIDEO_RPI)
  1156   endif(VIDEO_RPI)
  1158   endif(VIDEO_RPI)
  1157 endmacro(CheckRPI)
  1159 endmacro(CheckRPI)
  1158 
  1160 
  1159 # Requires:
  1161 # Requires: