@@ -38,7 +38,7 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h)
38
38
# Definitions that are shared for all OSes
39
39
#
40
40
add_definitions ( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS )
41
- add_definitions ( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT -DUSE_TRY )
41
+ add_definitions ( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT )
42
42
43
43
44
44
#
@@ -290,33 +290,33 @@ IF(CONNECT_WITH_ZIP)
290
290
ENDIF (CONNECT_WITH_ZIP )
291
291
292
292
#
293
- # MONGO C Driver (CMAKE NOT YET WORKING)
293
+ # MONGO C Driver
294
294
#
295
295
296
- # IF(CONNECT_WITH_MONGO)
297
- # IF(WIN32)
298
- # # Adding some typical places to search in
299
- # SET(PC_MONGO_INCLUDE_DIRS
300
- # C:/mongo-c-driver/include
301
- # D:/mongo-c-driver/include)
302
- # SET(PC_MONGO_LIBRARY_DIRS
303
- # C:/mongo-c-driver/lib
304
- # D:/mongo-c-driver/lib)
305
- # ENDIF(WIN32)
306
- # FIND_PACKAGE(libmongoc 1.7)
307
- # IF (MONGO_FOUND )
308
- # INCLUDE_DIRECTORIES(${MONGO_INCLUDE_DIR })
309
- # SET(MONGO_LIBRARY ${MONGO_LIBRARIES })
310
- # SET(CONNECT_SOURCES ${CONNECT_SOURCES}
311
- # cmgoconn.cpp cmgfam.cpp tabcmg.cpp
312
- # cmgoconn.h cmgfam.h tabcmg.h)
313
- # add_definitions(-DCMGO_SUPPORT)
314
- # IF (NOT JAVA_FOUND AND JNI_FOUND)
315
- # SET(CONNECT_SOURCES ${CONNECT_SOURCES} mongo.cpp mongo.h)
316
- # add_definitions(-DMONGO_SUPPORT)
317
- # ENDIF (NOT JAVA_FOUND AND JNI_FOUND)
318
- # ENDIF(MONGO_FOUND )
319
- # ENDIF(CONNECT_WITH_MONGO)
296
+ IF (CONNECT_WITH_MONGO )
297
+ IF (WIN32 )
298
+ # Adding some typical places to search in
299
+ SET (PC_MONGO_INCLUDE_DIRS
300
+ C:/mongo-c-driver/include
301
+ D:/mongo-c-driver/include )
302
+ SET (PC_MONGO_LIBRARY_DIRS
303
+ C:/mongo-c-driver/lib
304
+ D:/mongo-c-driver/lib )
305
+ ENDIF (WIN32 )
306
+ FIND_PACKAGE (libmongoc-1.0 1.7 )
307
+ IF (libmongoc-1.0_FOUND )
308
+ INCLUDE_DIRECTORIES (${MONGOC_INCLUDE_DIRS } )
309
+ SET (MONGOC_LIBRARY ${MONGOC_LIBRARIES } )
310
+ SET (CONNECT_SOURCES ${CONNECT_SOURCES}
311
+ cmgoconn.cpp cmgfam.cpp tabcmg.cpp
312
+ cmgoconn.h cmgfam.h tabcmg.h )
313
+ add_definitions (-DCMGO_SUPPORT )
314
+ IF (NOT JAVA_FOUND AND JNI_FOUND )
315
+ SET (CONNECT_SOURCES ${CONNECT_SOURCES} mongo.cpp mongo.h )
316
+ add_definitions (-DMONGO_SUPPORT )
317
+ ENDIF (NOT JAVA_FOUND AND JNI_FOUND )
318
+ ENDIF (libmongoc-1.0_FOUND )
319
+ ENDIF (CONNECT_WITH_MONGO )
320
320
321
321
322
322
#
@@ -337,9 +337,8 @@ MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES}
337
337
STORAGE_ENGINE
338
338
COMPONENT connect-engine
339
339
RECOMPILE_FOR_EMBEDDED
340
- # LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY} $(MONGO_LIBRARY)
341
340
LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY}
342
- ${ODBC_LIBRARY} ${JDBC_LIBRARY} ${IPHLPAPI_LIBRARY} )
341
+ ${ODBC_LIBRARY} ${JDBC_LIBRARY} ${MONGOC_LIBRARY } ${IPHLPAPI_LIBRARY} )
343
342
344
343
IF (NOT TARGET connect )
345
344
RETURN ()
@@ -369,3 +368,5 @@ IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
369
368
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine )
370
369
ENDIF ()
371
370
371
+
372
+
0 commit comments