Open GabrieleGiuseppini opened 3 years ago
Specifying BUILD_SHARED_LIBS only makes the IL library static, it has no effect on ILU nor ILUT.
BUILD_SHARED_LIBS
Fix is quite simple, e.g. in the ILU CMakeLists.txt:
diff --git a/DevIL/src-ILU/CMakeLists.txt b/DevIL/src-ILU/CMakeLists.txt index 17a3afe7..5816dada 100644 --- a/DevIL/src-ILU/CMakeLists.txt +++ b/DevIL/src-ILU/CMakeLists.txt @@ -42,9 +42,12 @@ source_group("Source Files" FILES src/*.cpp) source_group("Header Files" FILES ${ILU_INC} ) source_group("Resource Files" FILES ${ILU_RSRC} ) -# Remove SHARED to create a static library -add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) - +if(BUILD_SHARED_LIBS) + add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) + set_target_properties(ILU PROPERTIES SOVERSION 1) +else(BUILD_SHARED_LIBS) + add_library(ILU ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) +endif(BUILD_SHARED_LIBS)
Specifying
BUILD_SHARED_LIBS
only makes the IL library static, it has no effect on ILU nor ILUT.Fix is quite simple, e.g. in the ILU CMakeLists.txt: