forked from aerys/minko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '208-update-devil-s-library-to-its-latest-release' into …
…'master' Resolve "Update DevIL's library to its latest release." Closes aerys#207 and aerys#208 See merge request aerys/smartshape-engine!202
- Loading branch information
Showing
544 changed files
with
11,070 additions
and
204,547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,32 @@ | ||
cmake_minimum_required(VERSION 3.5.1) | ||
|
||
file (RELATIVE_PATH RELATIVE_LIBRARY_PATH ${MINKO_HOME}/../ ${CMAKE_CURRENT_SOURCE_DIR}) | ||
file (COPY ${CMAKE_CURRENT_SOURCE_DIR}/enable.cmake DESTINATION ${MINKO_HOME}/${RELATIVE_LIBRARY_PATH}) | ||
file (COPY ${CMAKE_CURRENT_SOURCE_DIR}/include DESTINATION ${MINKO_HOME}/${RELATIVE_LIBRARY_PATH}) | ||
file(RELATIVE_PATH RELATIVE_LIBRARY_PATH ${MINKO_HOME}/../ ${CMAKE_CURRENT_SOURCE_DIR}) | ||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/enable.cmake DESTINATION ${MINKO_HOME}/${RELATIVE_LIBRARY_PATH}) | ||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/include DESTINATION ${MINKO_HOME}/${RELATIVE_LIBRARY_PATH}) | ||
|
||
set (PROJECT_NAME "minko-plugin-devil") | ||
### Plugin is called minko-plugin-devil. | ||
set(PROJECT_NAME "minko-plugin-devil") | ||
|
||
### Do not build the plugin on Android and iOS platforms. | ||
if (ANDROID OR IOS) | ||
return() | ||
endif () | ||
|
||
file ( | ||
GLOB_RECURSE | ||
${PROJECT_NAME}_SRC | ||
"${CMAKE_CURRENT_SOURCE_DIR}/*.hpp" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/*.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/*.c" | ||
) | ||
### Loads 3rdParty libraries. | ||
add_subdirectory(lib) | ||
|
||
file ( | ||
GLOB | ||
${PROJECT_NAME}_EXCLUDES | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/src/src-ILU/ilur/ilur.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/src/src-IL/src/il_main.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjpeg/wrjpgcom.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjpeg/jpegtran.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjpeg/djpeg.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjpeg/cjpeg.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjpeg/ckconfig.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjpeg/example.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjpeg/rdjpgcom.c" | ||
) | ||
minko_add_library (${PROJECT_NAME} STATIC | ||
src/minko/file/DevILParser.cpp | ||
src/minko/file/DevILWriter.cpp) | ||
|
||
file ( | ||
GLOB | ||
${PROJECT_NAME}_INCLUDE | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/src/include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/src/src-IL/include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/src/src-ILU/include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/src/src-ILUT/include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjpeg" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libtiff" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libpng" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/libjasper/include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/devil/lib/lcms/include" | ||
) | ||
### Includes directories within/for the plugin. | ||
target_include_directories(${PROJECT_NAME} | ||
PUBLIC include | ||
PRIVATE lib/devil/DevIL/include #[[Needed because DevIL's targets does not include their directory within.]]) | ||
|
||
foreach (OBJ ${${PROJECT_NAME}_EXCLUDES}) | ||
list(REMOVE_ITEM ${PROJECT_NAME}_SRC ${OBJ}) | ||
endforeach () | ||
|
||
minko_add_library (${PROJECT_NAME} STATIC "${${PROJECT_NAME}_SRC}") | ||
target_include_directories (${PROJECT_NAME} PRIVATE ${${PROJECT_NAME}_INCLUDE}) | ||
### Links IL, ILU and ILUT (DevIL targets) to the plugin. | ||
target_link_libraries(${PROJECT_NAME} IL ILU ILUT) | ||
|
||
minko_enable_plugin_zlib (${PROJECT_NAME}) | ||
|
||
target_compile_options (${PROJECT_NAME} PRIVATE -D_CRT_SECURE_NO_WARNINGS -DIL_STATIC_LIB) | ||
|
||
if (UNIX AND NOT ANDROID) | ||
target_compile_definitions (${PROJECT_NAME} PRIVATE "NOINLINE") | ||
endif () | ||
|
||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR APPLE OR EMSCRIPTEN) | ||
target_compile_options ( | ||
${PROJECT_NAME} PRIVATE | ||
-DNOINLINE | ||
-Wno-implicit-function-declaration | ||
-Wno-format | ||
-Wno-int-to-void-pointer-cast | ||
-Wno-incompatible-pointer-types | ||
-Wno-unused-value | ||
-Wno-sizeof-pointer-memaccess | ||
-Wno-tautological-constant-out-of-range-compare | ||
-Wno-deprecated-declarations | ||
) | ||
endif() | ||
target_compile_options (${PROJECT_NAME} PRIVATE -D_CRT_SECURE_NO_WARNINGS -DIL_STATIC_LIB) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
### Loads DevIL 3rdParty library. | ||
add_subdirectory(devil/DevIL) | ||
|
||
### Silents some warnings when building DevIL's IL library. | ||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR | ||
CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR | ||
CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" OR | ||
EMSCRIPTEN) | ||
target_compile_options(IL PRIVATE | ||
-Wno-unused-result | ||
-Wno-unused-value | ||
-Wno-invalid-source-encoding | ||
-Wno-tautological-pointer-compare | ||
-Wno-tautological-constant-out-of-range-compare | ||
-Wno-address-of-packed-member | ||
-Wno-sizeof-pointer-memaccess) | ||
endif () |
Oops, something went wrong.