summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprotomors <protomors@gmail.com>2018-01-29 21:18:12 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-01-31 22:10:11 +0300
commit17a61a8acdaf80d89289f7d5b3989c47d4a8f0c8 (patch)
treeeb17012e5dbcefc38410569e642671ef5f3a3369
parentb8f8623145589530eae0bdb957e5337537797a92 (diff)
CMake: fixes for FreeImage.
-rw-r--r--libs/CMakeLists.txt3
-rw-r--r--libs/freeimage/CMakeLists.txt7
-rw-r--r--plugins/AdvaImg/CMakeLists.txt146
-rw-r--r--protocols/JabberG/CMakeLists.txt2
-rw-r--r--protocols/SkypeWeb/CMakeLists.txt2
-rw-r--r--protocols/Steam/CMakeLists.txt2
-rw-r--r--protocols/VKontakte/CMakeLists.txt2
-rw-r--r--src/core/stdidle/CMakeLists.txt3
-rw-r--r--src/mir_core/CMakeLists.txt2
9 files changed, 17 insertions, 152 deletions
diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt
index 5c360a5ef0..006a77b2e4 100644
--- a/libs/CMakeLists.txt
+++ b/libs/CMakeLists.txt
@@ -1,3 +1,4 @@
add_subdirectory(zlib)
add_subdirectory(libjson)
-add_subdirectory(libaxolotl) \ No newline at end of file
+add_subdirectory(libaxolotl)
+add_subdirectory(freeimage) \ No newline at end of file
diff --git a/libs/freeimage/CMakeLists.txt b/libs/freeimage/CMakeLists.txt
new file mode 100644
index 0000000000..e16d65e9af
--- /dev/null
+++ b/libs/freeimage/CMakeLists.txt
@@ -0,0 +1,7 @@
+file(GLOB SOURCES "src/*.h" "src/*.cpp" "src/FreeImage/*.cpp" "src/FreeImageToolkit/*.cpp" "src/Metadata/*.cpp" "src/LibJPEG/*.c" "src/LibPNG/*.c")
+set(TARGET FreeImage)
+include(${CMAKE_SOURCE_DIR}/cmake/lib.cmake)
+
+set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "FREEIMAGE_EXPORTS")
+target_include_directories(${TARGET} PRIVATE src ${CMAKE_SOURCE_DIR}/libs/zlib/src)
+target_link_libraries(${TARGET} Zlib) \ No newline at end of file
diff --git a/plugins/AdvaImg/CMakeLists.txt b/plugins/AdvaImg/CMakeLists.txt
index bf6aaf6e65..2b69109d24 100644
--- a/plugins/AdvaImg/CMakeLists.txt
+++ b/plugins/AdvaImg/CMakeLists.txt
@@ -1,147 +1,5 @@
-file(GLOB SOURCES "src/*.h"
-"src/FreeImage/*.h"
-"src/FreeImageToolkit/*.h"
-"src/LibJPEG/*.h"
-"src/LibPNG/*.h"
-"src/Metadata/*.h"
-
-"src/FreeImageToolkit/Background.cpp"
-"src/FreeImage/BitmapAccess.cpp"
-"src/FreeImage/ColorLookup.cpp"
-"src/FreeImage/ConversionFloat.cpp"
-"src/FreeImage/ConversionRGB16.cpp"
-"src/FreeImage/ConversionRGBA16.cpp"
-"src/FreeImage/ConversionRGBAF.cpp"
-"src/FreeImage/ConversionUINT16.cpp"
-"src/FreeImage/FreeImage.cpp"
-"src/FreeImage/FreeImageIO.cpp"
-"src/FreeImage/GetType.cpp"
-"src/FreeImage/LFPQuantizer.cpp"
-"src/FreeImage/MemoryIO.cpp"
-"src/FreeImage/PixelAccess.cpp"
-"src/FreeImage/Plugin.cpp"
-"src/FreeImage/PluginBMP.cpp"
-"src/FreeImage/PluginGIF.cpp"
-"src/FreeImage/PluginICO.cpp"
-"src/FreeImage/PluginJPEG.cpp"
-"src/FreeImage/PluginPNG.cpp"
-"src/FreeImage/Conversion.cpp"
-"src/FreeImage/Conversion16_555.cpp"
-"src/FreeImage/Conversion16_565.cpp"
-"src/FreeImage/Conversion24.cpp"
-"src/FreeImage/Conversion32.cpp"
-"src/FreeImage/Conversion4.cpp"
-"src/FreeImage/Conversion8.cpp"
-"src/FreeImage/ConversionRGBF.cpp"
-"src/FreeImage/ConversionType.cpp"
-"src/FreeImage/Halftoning.cpp"
-"src/FreeImageToolkit/MultigridPoissonSolver.cpp"
-"src/FreeImage/tmoColorConvert.cpp"
-"src/FreeImage/tmoDrago03.cpp"
-"src/FreeImage/tmoFattal02.cpp"
-"src/FreeImage/tmoReinhard05.cpp"
-"src/FreeImage/ToneMapping.cpp"
-"src/FreeImage/NNQuantizer.cpp"
-"src/FreeImage/WuQuantizer.cpp"
-"src/FreeImage/CacheFile.cpp"
-"src/FreeImage/MultiPage.cpp"
-"src/FreeImage/ZLibInterface.cpp"
-"src/LibJPEG/jaricom.c"
-"src/LibJPEG/jcarith.c"
-"src/LibJPEG/jdarith.c"
-"src/LibJPEG/jdhuff.c"
-"src/Metadata/Exif.cpp"
-"src/Metadata/FIRational.cpp"
-"src/Metadata/FreeImageTag.cpp"
-"src/Metadata/IPTC.cpp"
-"src/Metadata/TagConversion.cpp"
-"src/Metadata/TagLib.cpp"
-"src/main.cpp"
-"src/LibJPEG/jcapimin.c"
-"src/LibJPEG/jcapistd.c"
-"src/LibJPEG/jccoefct.c"
-"src/LibJPEG/jccolor.c"
-"src/LibJPEG/jcdctmgr.c"
-"src/LibJPEG/jchuff.c"
-"src/LibJPEG/jcinit.c"
-"src/LibJPEG/jcmainct.c"
-"src/LibJPEG/jcmarker.c"
-"src/LibJPEG/jcmaster.c"
-"src/LibJPEG/jcomapi.c"
-"src/LibJPEG/jcparam.c"
-"src/LibJPEG/jcprepct.c"
-"src/LibJPEG/jcsample.c"
-"src/LibJPEG/jctrans.c"
-"src/LibJPEG/jdapimin.c"
-"src/LibJPEG/jdapistd.c"
-"src/LibJPEG/jdatadst.c"
-"src/LibJPEG/jdatasrc.c"
-"src/LibJPEG/jdcoefct.c"
-"src/LibJPEG/jdcolor.c"
-"src/LibJPEG/jddctmgr.c"
-"src/LibJPEG/jdinput.c"
-"src/LibJPEG/jdmainct.c"
-"src/LibJPEG/jdmarker.c"
-"src/LibJPEG/jdmaster.c"
-"src/LibJPEG/jdmerge.c"
-"src/LibJPEG/jdpostct.c"
-"src/LibJPEG/jdsample.c"
-"src/LibJPEG/jdtrans.c"
-"src/LibJPEG/jerror.c"
-"src/LibJPEG/jfdctflt.c"
-"src/LibJPEG/jfdctfst.c"
-"src/LibJPEG/jfdctint.c"
-"src/LibJPEG/jidctflt.c"
-"src/LibJPEG/jidctfst.c"
-"src/LibJPEG/jidctint.c"
-"src/LibJPEG/jmemmgr.c"
-"src/LibJPEG/jmemnobs.c"
-"src/LibJPEG/jquant1.c"
-"src/LibJPEG/jquant2.c"
-"src/LibJPEG/jutils.c"
-"src/LibJPEG/rdbmp.c"
-"src/LibJPEG/rdcolmap.c"
-"src/LibJPEG/rdgif.c"
-"src/LibJPEG/rdppm.c"
-"src/LibJPEG/rdrle.c"
-"src/LibJPEG/rdswitch.c"
-"src/LibJPEG/rdtarga.c"
-"src/LibJPEG/transupp.c"
-"src/LibJPEG/wrbmp.c"
-"src/LibJPEG/wrgif.c"
-"src/LibJPEG/wrppm.c"
-"src/LibJPEG/wrrle.c"
-"src/LibJPEG/wrtarga.c"
-"src/LibPNG/png.c"
-"src/LibPNG/pngerror.c"
-"src/LibPNG/pngget.c"
-"src/LibPNG/pngmem.c"
-"src/LibPNG/pngpread.c"
-"src/LibPNG/pngread.c"
-"src/LibPNG/pngrio.c"
-"src/LibPNG/pngrtran.c"
-"src/LibPNG/pngrutil.c"
-"src/LibPNG/pngset.c"
-"src/LibPNG/pngtrans.c"
-"src/LibPNG/pngwio.c"
-"src/LibPNG/pngwrite.c"
-"src/LibPNG/pngwtran.c"
-"src/LibPNG/pngwutil.c"
-"src/FreeImageToolkit/BSplineRotate.cpp"
-"src/FreeImageToolkit/Channels.cpp"
-"src/FreeImageToolkit/ClassicRotate.cpp"
-"src/FreeImageToolkit/Colors.cpp"
-"src/FreeImageToolkit/CopyPaste.cpp"
-"src/FreeImageToolkit/Display.cpp"
-"src/FreeImageToolkit/Flip.cpp"
-"src/FreeImageToolkit/JPEGTransform.cpp"
-"src/FreeImageToolkit/Rescale.cpp"
-"src/FreeImageToolkit/Resize.cpp"
-)
-include_directories("src" "src/FreeImage" "src/FreeImageToolkit" "src/LibJPEG"
-"src/LibPNG" "src/Metadata" "${CMAKE_SOURCE_DIR}/libs/zLib/src")
+file(GLOB SOURCES "src/*.h" "src/*.cpp")
set(TARGET AdvaImg)
include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake)
-target_link_libraries(${TARGET} Zlib)
-set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "FREEIMAGE_EXPORTS") \ No newline at end of file
+target_link_libraries(${TARGET} FreeImage) \ No newline at end of file
diff --git a/protocols/JabberG/CMakeLists.txt b/protocols/JabberG/CMakeLists.txt
index 65f5bb3a66..87ef6d2d81 100644
--- a/protocols/JabberG/CMakeLists.txt
+++ b/protocols/JabberG/CMakeLists.txt
@@ -2,6 +2,6 @@ file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc")
set(TARGET Jabber)
include_directories(${CMAKE_SOURCE_DIR}/libs/libaxolotl/src)
include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake)
-target_link_libraries(${TARGET} Zlib libaxolotl ${OPENSSL_LIBRARIES} comctl32.lib UxTheme.lib ws2_32.lib)
+target_link_libraries(${TARGET} Zlib FreeImage libaxolotl ${OPENSSL_LIBRARIES} comctl32.lib UxTheme.lib ws2_32.lib)
add_subdirectory(jabber_xstatus)
add_subdirectory(proto_jabber) \ No newline at end of file
diff --git a/protocols/SkypeWeb/CMakeLists.txt b/protocols/SkypeWeb/CMakeLists.txt
index 739bbe8aec..82f4455c21 100644
--- a/protocols/SkypeWeb/CMakeLists.txt
+++ b/protocols/SkypeWeb/CMakeLists.txt
@@ -1,6 +1,6 @@
file(GLOB SOURCES "src/*.h" "src/requests/*.h" "src/requests/asm/*.h" "src/*.cpp" "res/*.rc")
set(TARGET SkypeWeb)
include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake)
-target_link_libraries(${TARGET} libjson)
+target_link_libraries(${TARGET} libjson FreeImage)
add_subdirectory(proto_conn_skype)
add_subdirectory(proto_skype) \ No newline at end of file
diff --git a/protocols/Steam/CMakeLists.txt b/protocols/Steam/CMakeLists.txt
index 9dacd1a586..4622d849bb 100644
--- a/protocols/Steam/CMakeLists.txt
+++ b/protocols/Steam/CMakeLists.txt
@@ -1,5 +1,5 @@
file(GLOB SOURCES "src/*.h" "src/api/*.h" "src/*.cpp" "res/*.rc")
set(TARGET Steam)
include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake)
-target_link_libraries(${TARGET} libjson comctl32.lib)
+target_link_libraries(${TARGET} libjson FreeImage comctl32.lib)
add_subdirectory(proto_steam) \ No newline at end of file
diff --git a/protocols/VKontakte/CMakeLists.txt b/protocols/VKontakte/CMakeLists.txt
index 5de2c6962d..ad424fb613 100644
--- a/protocols/VKontakte/CMakeLists.txt
+++ b/protocols/VKontakte/CMakeLists.txt
@@ -1,5 +1,5 @@
file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc")
set(TARGET VKontakte)
include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake)
-target_link_libraries(${TARGET} libjson)
+target_link_libraries(${TARGET} libjson FreeImage)
add_subdirectory(proto_vkontakte) \ No newline at end of file
diff --git a/src/core/stdidle/CMakeLists.txt b/src/core/stdidle/CMakeLists.txt
index e11c1176b5..67735cfc07 100644
--- a/src/core/stdidle/CMakeLists.txt
+++ b/src/core/stdidle/CMakeLists.txt
@@ -1,3 +1,2 @@
set(TARGET StdIdle)
-include(${CMAKE_SOURCE_DIR}/cmake/core.cmake)
-target_link_libraries(${TARGET} Wtsapi32.lib) \ No newline at end of file
+include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) \ No newline at end of file
diff --git a/src/mir_core/CMakeLists.txt b/src/mir_core/CMakeLists.txt
index 8c39e0e4d5..d855e7eada 100644
--- a/src/mir_core/CMakeLists.txt
+++ b/src/mir_core/CMakeLists.txt
@@ -6,6 +6,6 @@ else()
endif()
set(TARGET mir_core)
include(${CMAKE_SOURCE_DIR}/cmake/lib.cmake)
-target_link_libraries(${TARGET} comctl32.lib)
+target_link_libraries(${TARGET} comctl32.lib Wtsapi32.lib)
set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "MIR_CORE_EXPORTS")
add_custom_command(TARGET ${TARGET} PRE_BUILD COMMAND "${CMAKE_SOURCE_DIR}/build/make_ver.bat") \ No newline at end of file