diff --git a/modules/platforms/cpp/CMakeLists.txt b/modules/platforms/cpp/CMakeLists.txt index 90632c1396b..c0c3a674b3a 100644 --- a/modules/platforms/cpp/CMakeLists.txt +++ b/modules/platforms/cpp/CMakeLists.txt @@ -32,6 +32,8 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +add_definitions(-DIGNITE_FRIEND) + list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) if("${isSystemDir}" STREQUAL "-1") diff --git a/modules/platforms/cpp/core-test/CMakeLists.txt b/modules/platforms/cpp/core-test/CMakeLists.txt index 7185874a763..83453d8a3c8 100644 --- a/modules/platforms/cpp/core-test/CMakeLists.txt +++ b/modules/platforms/cpp/core-test/CMakeLists.txt @@ -19,6 +19,11 @@ project(ignite-tests) set(TARGET ${PROJECT_NAME}) +if (WIN32) + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_MULTITHREADED ON) +endif() + find_package(Boost 1.53 REQUIRED COMPONENTS unit_test_framework chrono thread system) include_directories(include ${Boost_INCLUDE_DIRS} ${JNI_INCLUDE_DIRS}) diff --git a/modules/platforms/cpp/network/CMakeLists.txt b/modules/platforms/cpp/network/CMakeLists.txt index 10749e6a78e..117f799eb40 100644 --- a/modules/platforms/cpp/network/CMakeLists.txt +++ b/modules/platforms/cpp/network/CMakeLists.txt @@ -47,6 +47,10 @@ set_target_properties(${TARGET} PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) target_link_libraries(${TARGET} ignite-common) +if(WIN32) + target_link_libraries(${TARGET} wsock32 ws2_32 iphlpapi) +endif() + target_include_directories(${TARGET} INTERFACE include) install(TARGETS ${TARGET} LIBRARY DESTINATION lib) diff --git a/modules/platforms/cpp/odbc-test/CMakeLists.txt b/modules/platforms/cpp/odbc-test/CMakeLists.txt index 2b67a1f4658..7a05d33fabb 100644 --- a/modules/platforms/cpp/odbc-test/CMakeLists.txt +++ b/modules/platforms/cpp/odbc-test/CMakeLists.txt @@ -19,7 +19,12 @@ project(ignite-odbc-tests) set(TARGET ${PROJECT_NAME}) -find_package(Boost 1.53 REQUIRED COMPONENTS unit_test_framework chrono thread system) +if (WIN32) + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_MULTITHREADED ON) +endif() + +find_package(Boost 1.53 REQUIRED COMPONENTS unit_test_framework chrono thread system regex) find_package(ODBC REQUIRED) @@ -87,6 +92,10 @@ add_executable(${TARGET} ${SOURCES}) target_link_libraries(${TARGET} ${Boost_LIBRARIES} ignite ${ODBC_LIBRARY}) +if (WIN32) + remove_definitions(-DUNICODE=1) +endif() + if (NOT WIN32) add_definitions(-DBOOST_TEST_DYN_LINK) endif() diff --git a/modules/platforms/cpp/odbc/CMakeLists.txt b/modules/platforms/cpp/odbc/CMakeLists.txt index fb0199bdb6d..a1baa165157 100644 --- a/modules/platforms/cpp/odbc/CMakeLists.txt +++ b/modules/platforms/cpp/odbc/CMakeLists.txt @@ -85,7 +85,18 @@ add_library(${TARGET} SHARED ${SOURCES}) set_target_properties(${TARGET} PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) -target_link_libraries(${TARGET} ignite-binary ignite-network ${ODBC_LIBRARIES}) +target_link_libraries(${TARGET} ignite-common ignite-binary ignite-network ${ODBC_LIBRARIES}) + +if (WIN32) + target_link_libraries(${TARGET} odbccp32 shlwapi) + + remove_definitions(-DUNICODE=1) + add_definitions(-DTARGET_MODULE_FULL_NAME="${TARGET}") +endif() + +if (MSVC_VERSION GREATER_EQUAL 1900) + target_link_libraries(${TARGET} legacy_stdio_definitions) +endif() target_include_directories(${TARGET} INTERFACE include) diff --git a/modules/platforms/cpp/thin-client-test/CMakeLists.txt b/modules/platforms/cpp/thin-client-test/CMakeLists.txt index 1e4e062a149..f7576d81556 100644 --- a/modules/platforms/cpp/thin-client-test/CMakeLists.txt +++ b/modules/platforms/cpp/thin-client-test/CMakeLists.txt @@ -2,6 +2,11 @@ project(ignite-thin-client-tests) set(TARGET ${PROJECT_NAME}) +if (WIN32) + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_MULTITHREADED ON) +endif() + find_package(Boost 1.53 REQUIRED COMPONENTS unit_test_framework chrono thread system) include_directories(include ${Boost_INCLUDE_DIRS} ${JNI_INCLUDE_DIRS})