summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/core.cmake3
-rw-r--r--cmake/plugin.cmake3
-rw-r--r--include/m_core.h8
-rw-r--r--include/newpluginapi.h8
-rw-r--r--libs/libjson/CMakeLists.txt3
-rw-r--r--protocols/JabberG/CMakeLists.txt2
-rw-r--r--src/mir_app/CMakeLists.txt2
-rw-r--r--src/mir_core/CMakeLists.txt2
9 files changed, 9 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7e1a4b6a4..c999add346 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,6 @@ set(SSL_EAY_RELEASE ${PREBUILT_DIR}/ssleay32.lib CACHE FILEPATH "ssleay release
find_package(OpenSSL)
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS")
-link_directories(${PREBUILT_DIR})
include_directories(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include/msapi ${CMAKE_SOURCE_DIR}/plugins/ExternalAPI)
add_subdirectory(build)
diff --git a/cmake/core.cmake b/cmake/core.cmake
index 2c8b080dd2..10cf9b5cc3 100644
--- a/cmake/core.cmake
+++ b/cmake/core.cmake
@@ -12,4 +12,5 @@ endif()
set_target_properties(${TARGET} PROPERTIES
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$<CONFIG>/Core"
-) \ No newline at end of file
+)
+target_link_libraries(${TARGET} mir_core cmstub) \ No newline at end of file
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index a15b2f5f81..d8b93829d9 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -10,4 +10,5 @@ endif()
set_target_properties(${TARGET} PROPERTIES
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$<CONFIG>/Plugins"
-) \ No newline at end of file
+)
+target_link_libraries(${TARGET} mir_core cmstub) \ No newline at end of file
diff --git a/include/m_core.h b/include/m_core.h
index 086b78cbb7..182b3f1ff3 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -582,12 +582,4 @@ inline int mir_vsnwprintf(_Pre_notnull_ _Always_(_Post_z_) wchar_t(&buffer)[_Siz
#endif
-#ifndef MIR_CORE_EXPORTS
- #pragma comment(lib, "mir_core.lib")
-#endif
-
-#ifndef MIR_APP_EXPORTS
- #pragma comment(lib, "mir_app.lib")
-#endif
-
#endif // M_CORE_H
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index 153da7936e..94e708d6a6 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -501,14 +501,6 @@ public:
template<class P>
OBJLIST<P> ACCPROTOPLUGIN<P>::g_arInstances(1, PtrKeySortT);
-#ifndef __NO_CMPLUGIN_NEEDED
-#ifdef _DEBUG
-#pragma comment(lib, "cmstubd.lib")
-#else
-#pragma comment(lib, "cmstub.lib")
-#endif
-#endif
-
EXTERN_C MIR_APP_DLL(HINSTANCE) GetInstByAddress(void* codePtr);
EXTERN_C MIR_APP_DLL(CMPluginBase&) GetPluginByInstance(HINSTANCE hInst);
diff --git a/libs/libjson/CMakeLists.txt b/libs/libjson/CMakeLists.txt
index 62b68e2eb2..acee348136 100644
--- a/libs/libjson/CMakeLists.txt
+++ b/libs/libjson/CMakeLists.txt
@@ -7,4 +7,5 @@ endif()
set(TARGET libjson)
include(${CMAKE_SOURCE_DIR}/cmake/lib.cmake)
-set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "LIBJSON_EXPORTS") \ No newline at end of file
+set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "LIBJSON_EXPORTS")
+target_link_libraries(${TARGET} mir_app) \ No newline at end of file
diff --git a/protocols/JabberG/CMakeLists.txt b/protocols/JabberG/CMakeLists.txt
index 520f38cfb5..77115a602e 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/libsignal/src)
include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake)
-target_link_libraries(${TARGET} Zlib FreeImage libsignal ${OPENSSL_LIBRARIES} comctl32.lib UxTheme.lib ws2_32.lib)
+target_link_libraries(${TARGET} Zlib FreeImage libsignal libjson ${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/src/mir_app/CMakeLists.txt b/src/mir_app/CMakeLists.txt
index e9154b2499..f3a6ca45e5 100644
--- a/src/mir_app/CMakeLists.txt
+++ b/src/mir_app/CMakeLists.txt
@@ -7,5 +7,5 @@ endif()
set(TARGET mir_app)
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
include(${CMAKE_SOURCE_DIR}/cmake/lib.cmake)
-target_link_libraries(${TARGET} Zlib FreeImage UxTheme.lib ws2_32.lib)
+target_link_libraries(${TARGET} Zlib FreeImage UxTheme.lib ws2_32.lib ${PREBUILT_DIR}/mir_core.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 d855e7eada..de7f89c588 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 Wtsapi32.lib)
+target_link_libraries(${TARGET} comctl32.lib Wtsapi32.lib ${PREBUILT_DIR}/mir_app.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