Minor fixes for issues found while cross-building v2 (#2556)
* irrlicht: Fix harmless typo when setting CMAKE_CXX_FLAGS The CMAKE_CXX_FLAGS set should be based on previously set CMAKE_CXX_FLAGS (instead of C flags). This is currently harmless because CMAKE_CXX_FLAGS is not previously set. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> * irrlicht: Get rid of unprefixed cflags Cross-building requires proper include paths. This commit removes the unprefixed -I/usr/X11R6/include in irrlicht cflags, replacing it with a proper CMake module. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> * irrlicht: Fix boolean return type for jpeglib's callback Building on certain toolchains can fail due to returning an integer instead of TRUE. In any case, only {TRUE,FALSE} should be used as 'boolean' jpeglib type. Fix this by returning TRUE. CImageLoaderJPG.cpp: In static member function 'static boolean irr::video::CImageLoaderJPG::fill_input_buffer(j_decompress_ptr)': CImageLoaderJPG.cpp:69:9: error: invalid conversion from 'int' to 'boolean' [-fpermissive] Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
This commit is contained in:
parent
a0898962a9
commit
02361a37e8
@ -1,10 +1,12 @@
|
||||
# CMakeLists.txt for Irrlicht in STK
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(JPEG REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/"
|
||||
"${JPEG_INCLUDE_DIR}"
|
||||
"${PNG_INCLUDE_DIRS}"
|
||||
"${X11_INCLUDE_DIR}"
|
||||
"${ZLIB_INCLUDE_DIR}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../zlib/") # For zconf.h on WIN32
|
||||
|
||||
@ -25,8 +27,8 @@ elseif(MINGW)
|
||||
add_definitions(-D_IRR_STATIC_LIB_)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Shut up about unsafe stuff
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing")
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexpensive-optimizations")
|
||||
endif()
|
||||
|
@ -66,7 +66,7 @@ void CImageLoaderJPG::init_source (j_decompress_ptr cinfo)
|
||||
boolean CImageLoaderJPG::fill_input_buffer (j_decompress_ptr cinfo)
|
||||
{
|
||||
// DO NOTHING
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user