@@ -310,34 +310,6 @@ IF(CONNECT_WITH_MONGO)
310
310
ENDIF (libmongoc-1.0_FOUND )
311
311
ENDIF (CONNECT_WITH_MONGO )
312
312
313
- #
314
- # REST
315
- #
316
-
317
- OPTION (CONNECT_WITH_REST "Compile CONNECT storage engine with REST support" ON )
318
-
319
- IF (CONNECT_WITH_REST )
320
- MESSAGE (STATUS "=====> REST support is ON" )
321
- FIND_PACKAGE (cpprestsdk )
322
- IF (cpprestsdk_FOUND )
323
- MESSAGE (STATUS "=====> cpprestsdk found" )
324
- IF (UNIX )
325
- # INCLUDE_DIRECTORIES(${CPPRESTSDK_INCLUDE_DIR})
326
- # If needed edit next line to set the path to libcpprest.so
327
- SET (REST_LIBRARY -lcpprest )
328
- MESSAGE (STATUS ${REST_LIBRARY} )
329
- ELSE (NOT UNIX )
330
- # Next line sets debug compile mode matching cpprest_2_10d.dll
331
- # when it was binary installed (can be change later in Visual Studio)
332
- # Comment it out if not needed depending on your cpprestsdk installation.
333
- SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd" )
334
- ENDIF (UNIX )
335
- SET (CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp restget.cpp tabrest.h )
336
- add_definitions (-DREST_SUPPORT )
337
- ELSE (NOT cpprestsdk_FOUND )
338
- MESSAGE (STATUS "=====> cpprestsdk package not found" )
339
- ENDIF (cpprestsdk_FOUND )
340
- ENDIF (CONNECT_WITH_REST )
341
313
342
314
#
343
315
# REST
@@ -346,7 +318,7 @@ ENDIF(CONNECT_WITH_REST)
346
318
OPTION (CONNECT_WITH_REST "Compile CONNECT storage engine with REST support" ON )
347
319
348
320
IF (CONNECT_WITH_REST )
349
- MESSAGE (STATUS "=====> REST support is ON" )
321
+ # MESSAGE(STATUS "=====> REST support is ON")
350
322
SET (CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp tabrest.h )
351
323
add_definitions (-DREST_SUPPORT )
352
324
FIND_PACKAGE (cpprestsdk QUIET )
@@ -366,8 +338,8 @@ IF(CONNECT_WITH_REST)
366
338
SET (CONNECT_SOURCES ${CONNECT_SOURCES} restget.cpp )
367
339
add_definitions (-DREST_SOURCE )
368
340
# ENDIF()
369
- ELSE (NOT cpprestsdk_FOUND )
370
- # MESSAGE(STATUS "=====> cpprestsdk package not found")
341
+ # ELSE(NOT cpprestsdk_FOUND)
342
+ # MESSAGE(STATUS "=====> cpprestsdk package not found")
371
343
ENDIF (cpprestsdk_FOUND )
372
344
ENDIF (CONNECT_WITH_REST )
373
345
@@ -396,35 +368,26 @@ IF(NOT TARGET connect)
396
368
RETURN ()
397
369
ENDIF ()
398
370
399
- # Don't link with bundled zlib and systel libxml2 at the same time.
400
- # System libxml2 uses system zlib, might conflict with the bundled one.
401
- IF (XML_LIBRARY AND BUILD_BUNDLED_ZLIB )
402
- GET_PROPERTY (INCS TARGET connect PROPERTY INCLUDE_DIRECTORIES )
403
- LIST (REMOVE_ITEM INCS ${ZLIB_INCLUDE_DIR} )
404
- SET_PROPERTY (TARGET connect PROPERTY INCLUDE_DIRECTORIES ${INCS} )
405
- ENDIF ()
406
-
407
371
IF (WIN32 )
408
372
IF (libmongoc-1.0_FOUND )
409
373
SET_TARGET_PROPERTIES (connect PROPERTIES LINK_FLAGS
410
374
"/DELAYLOAD:libbson-1.0.dll /DELAYLOAD:libmongoc-1.0.dll" )
411
375
ENDIF (libmongoc-1.0_FOUND )
376
+ ENDIF (WIN32 )
412
377
413
378
# Install some extra files that belong to connect engine
414
-
415
- INSTALL (FILES "$<TARGET_FILE_DIR:connect>/ha_connect.lib"
379
+ IF (WIN32 )
380
+ # install ha_connect.lib
381
+ GET_TARGET_PROPERTY (CONNECT_LOCATION connect LOCATION )
382
+ STRING (REPLACE "dll" "lib" CONNECT_LIB ${CONNECT_LOCATION} )
383
+ IF (CMAKE_CONFIGURATION_TYPES )
384
+ STRING (REPLACE "${CMAKE_CFG_INTDIR} " "\$ {CMAKE_INSTALL_CONFIG_NAME}"
385
+ CONNECT_LIB ${CONNECT_LIB} )
386
+ ENDIF ()
387
+ INSTALL (FILES ${CONNECT_LIB}
416
388
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine )
417
389
ENDIF (WIN32 )
418
390
419
- IF (MSVC )
420
- # Temporarily disable "conversion from size_t .."
421
- IF (CMAKE_SIZEOF_VOID_P EQUAL 8 )
422
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267" )
423
- ENDIF ()
424
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996" )
425
- string (REPLACE "/permissive-" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
426
- ENDIF ()
427
-
428
391
IF (CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND )
429
392
# TODO: Find how to compile and install the java wrapper classes
430
393
# Find required libraries and include directories
0 commit comments