From e62e68d8dad3e554fdd9a41cea6ecdf35cde3102 Mon Sep 17 00:00:00 2001 From: protomors Date: Wed, 8 Nov 2017 02:31:53 +0600 Subject: CMake: clean up library dependencies. --- CMakeLists.txt | 3 ++- cmake/core.cmake | 3 +-- cmake/icons.cmake | 3 +-- cmake/lib.cmake | 3 +-- cmake/plugin.cmake | 3 +-- plugins/Clist_modern/CMakeLists.txt | 1 + plugins/TopToolBar/CMakeLists.txt | 3 ++- protocols/IRCG/CMakeLists.txt | 1 + protocols/IcqOscarJ/CMakeLists.txt | 1 + protocols/JabberG/CMakeLists.txt | 2 +- protocols/MSN/CMakeLists.txt | 2 +- protocols/Steam/CMakeLists.txt | 1 + src/core/stdclist/CMakeLists.txt | 3 ++- src/core/stdfile/CMakeLists.txt | 3 ++- src/core/stdidle/CMakeLists.txt | 3 ++- src/core/stdssl/CMakeLists.txt | 2 +- src/core/stduserinfo/CMakeLists.txt | 3 ++- src/mir_app/CMakeLists.txt | 5 ++--- src/mir_core/CMakeLists.txt | 2 +- 19 files changed, 26 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5328c8ddf4..e76b31a297 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required (VERSION 2.8) project (Miranda) +find_package(OpenSSL) + set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS") if(CMAKE_CL_64) link_directories(${CMAKE_SOURCE_DIR}/libs/win64) @@ -9,7 +11,6 @@ else() link_directories(${CMAKE_SOURCE_DIR}/libs/win32) endif() include_directories(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include/msapi ${CMAKE_SOURCE_DIR}/plugins/ExternalAPI) -set(COMMON_LIBS winmm.lib Wtsapi32.lib netapi32.lib pdh.lib shlwapi.lib Strmiids.lib gdiplus.lib dbghelp.lib Setupapi.lib msimg32.lib comctl32.lib ws2_32.lib UxTheme.lib) add_subdirectory(libs) add_subdirectory(src) diff --git a/cmake/core.cmake b/cmake/core.cmake index 5fc7c37302..afb345d4a8 100644 --- a/cmake/core.cmake +++ b/cmake/core.cmake @@ -12,5 +12,4 @@ endif() set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS" RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$/Core" -) -target_link_libraries(${TARGET} ${COMMON_LIBS}) \ No newline at end of file +) \ No newline at end of file diff --git a/cmake/icons.cmake b/cmake/icons.cmake index c03630ef49..0096748919 100644 --- a/cmake/icons.cmake +++ b/cmake/icons.cmake @@ -3,5 +3,4 @@ add_library(${TARGET} SHARED ${SOURCES}) set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS /NOENTRY" RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$/Icons" -) -target_link_libraries(${TARGET} ${COMMON_LIBS}) \ No newline at end of file +) \ No newline at end of file diff --git a/cmake/lib.cmake b/cmake/lib.cmake index 64ceb02bd5..33e940a663 100644 --- a/cmake/lib.cmake +++ b/cmake/lib.cmake @@ -11,5 +11,4 @@ set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS" SUFFIX ".mir" RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$/Libs" -) -target_link_libraries(${TARGET} ${COMMON_LIBS}) \ No newline at end of file +) \ No newline at end of file diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index d3986c87c3..ed830572d6 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -10,5 +10,4 @@ endif() set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS" RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$/Plugins" -) -target_link_libraries(${TARGET} ${COMMON_LIBS}) \ No newline at end of file +) \ No newline at end of file diff --git a/plugins/Clist_modern/CMakeLists.txt b/plugins/Clist_modern/CMakeLists.txt index 9b2017d2f8..4952fce0bc 100644 --- a/plugins/Clist_modern/CMakeLists.txt +++ b/plugins/Clist_modern/CMakeLists.txt @@ -1,4 +1,5 @@ file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc") set(TARGET Clist_modern) include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) +target_link_libraries(${TARGET} comctl32.lib UxTheme.lib) add_subdirectory(icons_pack) \ No newline at end of file diff --git a/plugins/TopToolBar/CMakeLists.txt b/plugins/TopToolBar/CMakeLists.txt index d9fe0fba80..f2f3987bf6 100644 --- a/plugins/TopToolBar/CMakeLists.txt +++ b/plugins/TopToolBar/CMakeLists.txt @@ -1,3 +1,4 @@ file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc") set(TARGET TopToolBar) -include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) \ No newline at end of file +include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) +target_link_libraries(${TARGET} comctl32.lib) \ No newline at end of file diff --git a/protocols/IRCG/CMakeLists.txt b/protocols/IRCG/CMakeLists.txt index a281099459..9f37dca7f3 100644 --- a/protocols/IRCG/CMakeLists.txt +++ b/protocols/IRCG/CMakeLists.txt @@ -1,4 +1,5 @@ file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc") set(TARGET IRC) include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) +target_link_libraries(${TARGET} ws2_32.lib) add_subdirectory(proto_irc) \ No newline at end of file diff --git a/protocols/IcqOscarJ/CMakeLists.txt b/protocols/IcqOscarJ/CMakeLists.txt index f5c241229b..c5feb2c951 100644 --- a/protocols/IcqOscarJ/CMakeLists.txt +++ b/protocols/IcqOscarJ/CMakeLists.txt @@ -1,5 +1,6 @@ file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc") set(TARGET ICQ) include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) +target_link_libraries(${TARGET} comctl32.lib ws2_32.lib) add_subdirectory(proto_icq) add_subdirectory(icq_xstatus) \ No newline at end of file diff --git a/protocols/JabberG/CMakeLists.txt b/protocols/JabberG/CMakeLists.txt index 257a4cd8ae..65f5bb3a66 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 libeay32.lib ssleay32.lib) +target_link_libraries(${TARGET} Zlib 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/MSN/CMakeLists.txt b/protocols/MSN/CMakeLists.txt index a3984234ef..58e247810b 100644 --- a/protocols/MSN/CMakeLists.txt +++ b/protocols/MSN/CMakeLists.txt @@ -1,5 +1,5 @@ file(GLOB SOURCES "src/*.h" "src/skylogin/*.h" "src/*.cpp" "src/*.c" "src/skylogin/*.c" "res/*.rc") set(TARGET MSN) include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) -target_link_libraries(${TARGET} libeay32.lib) +target_link_libraries(${TARGET} libjson ${OPENSSL_LIBRARIES} comctl32.lib) add_subdirectory(proto_msn) \ No newline at end of file diff --git a/protocols/Steam/CMakeLists.txt b/protocols/Steam/CMakeLists.txt index 4f76cb5bf9..9dacd1a586 100644 --- a/protocols/Steam/CMakeLists.txt +++ b/protocols/Steam/CMakeLists.txt @@ -1,4 +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) add_subdirectory(proto_steam) \ No newline at end of file diff --git a/src/core/stdclist/CMakeLists.txt b/src/core/stdclist/CMakeLists.txt index 4477d53c3a..9c93e7d364 100644 --- a/src/core/stdclist/CMakeLists.txt +++ b/src/core/stdclist/CMakeLists.txt @@ -1,2 +1,3 @@ set(TARGET StdClist) -include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) \ No newline at end of file +include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) +target_link_libraries(${TARGET} comctl32.lib UxTheme.lib Shlwapi.lib) \ No newline at end of file diff --git a/src/core/stdfile/CMakeLists.txt b/src/core/stdfile/CMakeLists.txt index a91f49e32a..3454bf4121 100644 --- a/src/core/stdfile/CMakeLists.txt +++ b/src/core/stdfile/CMakeLists.txt @@ -1,2 +1,3 @@ set(TARGET StdFile) -include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) \ No newline at end of file +include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) +target_link_libraries(${TARGET} Shlwapi.lib) \ No newline at end of file diff --git a/src/core/stdidle/CMakeLists.txt b/src/core/stdidle/CMakeLists.txt index 67735cfc07..e11c1176b5 100644 --- a/src/core/stdidle/CMakeLists.txt +++ b/src/core/stdidle/CMakeLists.txt @@ -1,2 +1,3 @@ set(TARGET StdIdle) -include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) \ No newline at end of file +include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) +target_link_libraries(${TARGET} Wtsapi32.lib) \ No newline at end of file diff --git a/src/core/stdssl/CMakeLists.txt b/src/core/stdssl/CMakeLists.txt index ecc952031a..6b2c0a91d0 100644 --- a/src/core/stdssl/CMakeLists.txt +++ b/src/core/stdssl/CMakeLists.txt @@ -1,3 +1,3 @@ set(TARGET StdSSL) include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) -target_link_libraries(${TARGET} secur32.lib crypt32.lib) \ No newline at end of file +target_link_libraries(${TARGET} ws2_32.lib secur32.lib crypt32.lib) \ No newline at end of file diff --git a/src/core/stduserinfo/CMakeLists.txt b/src/core/stduserinfo/CMakeLists.txt index 42a47311b7..7bdbd5c48b 100644 --- a/src/core/stduserinfo/CMakeLists.txt +++ b/src/core/stduserinfo/CMakeLists.txt @@ -1,2 +1,3 @@ set(TARGET StdUserInfo) -include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) \ No newline at end of file +include(${CMAKE_SOURCE_DIR}/cmake/core.cmake) +target_link_libraries(${TARGET} UxTheme.lib ws2_32.lib) \ No newline at end of file diff --git a/src/mir_app/CMakeLists.txt b/src/mir_app/CMakeLists.txt index fa73635191..aee657a982 100644 --- a/src/mir_app/CMakeLists.txt +++ b/src/mir_app/CMakeLists.txt @@ -6,6 +6,5 @@ else() endif() set(TARGET mir_app) include(${CMAKE_SOURCE_DIR}/cmake/lib.cmake) - -set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "MIR_APP_EXPORTS") -target_link_libraries(${TARGET} Zlib) \ No newline at end of file +target_link_libraries(${TARGET} Zlib UxTheme.lib ws2_32.lib) +set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "MIR_APP_EXPORTS") \ No newline at end of file diff --git a/src/mir_core/CMakeLists.txt b/src/mir_core/CMakeLists.txt index d9ad3b5ba2..8c39e0e4d5 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) 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 -- cgit v1.2.3 From 9d493cceb8ba9dfe38c2beaacdb6b79487818d35 Mon Sep 17 00:00:00 2001 From: protomors Date: Wed, 29 Nov 2017 14:52:36 +0300 Subject: CMake: removed deprecated protocols. --- libs/CMakeLists.txt | 3 +-- protocols/CMakeLists.txt | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index 67fdb72838..5c360a5ef0 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -1,4 +1,3 @@ add_subdirectory(zlib) add_subdirectory(libjson) -add_subdirectory(libaxolotl) -add_subdirectory(libevent) \ No newline at end of file +add_subdirectory(libaxolotl) \ No newline at end of file diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt index e3c6bfff44..dc3e63f9c1 100644 --- a/protocols/CMakeLists.txt +++ b/protocols/CMakeLists.txt @@ -16,9 +16,7 @@ add_subdirectory(MSN) add_subdirectory(SkypeWeb) #add_subdirectory(Slack) add_subdirectory(Steam) -#add_subdirectory(Telegram) #add_subdirectory(Tlen) #add_subdirectory(Tox) add_subdirectory(Twitter) -add_subdirectory(VKontakte) -#add_subdirectory(WhatsApp) \ No newline at end of file +add_subdirectory(VKontakte) \ No newline at end of file -- cgit v1.2.3 From b1103b6eb24f654e2e2666b0c86a6206920fd23a Mon Sep 17 00:00:00 2001 From: protomors Date: Wed, 29 Nov 2017 16:50:55 +0300 Subject: CMake: also removed Slack. --- protocols/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt index dc3e63f9c1..d9360f7a01 100644 --- a/protocols/CMakeLists.txt +++ b/protocols/CMakeLists.txt @@ -14,7 +14,6 @@ add_subdirectory(MSN) #add_subdirectory(Omegle) #add_subdirectory(Sametime) add_subdirectory(SkypeWeb) -#add_subdirectory(Slack) add_subdirectory(Steam) #add_subdirectory(Tlen) #add_subdirectory(Tox) -- cgit v1.2.3