@@ -44,7 +44,7 @@ SET(STATIC_MSVCRT ON CACHE BOOL "force static lib" FORCE)
4444
4545SET (WITH_UNIT_TESTS OFF CACHE BOOL "no mysql tests" FORCE )
4646set (WITH_SSL "OFF" CACHE STRING "Disabled for now" FORCE )
47- #set(LIBMARIADB_PLUGIN_LIBS "libcmtd.lib" CACHE STRING "force static build" FORCE)
47+ #TODO test with wolfssl
4848
4949if (CMAKE_COMPILER_IS_GNUCXX)
5050 set (CMAKE_CXX_FLAGS "-std=c++1z -O2 -s -fPIC -fpermissive -static-libgcc -static-libstdc++" )#-march=i686 -m32
@@ -59,51 +59,6 @@ else()
5959endif ()
6060
6161
62-
63-
64- # Override add_library() and set the "EXCLUDE_FROM_DEFAULT_BUILD" property to TRUE on all libraries that use "EXCLUDE_FROM_ALL".
65- function (add_library TARGET )
66- _add_library (${TARGET} ${ARGN} )
67- cmake_parse_arguments (OPTS "EXCLUDE_FROM_ALL" "" "" ${ARGN} )
68- if (OPTS_EXCLUDE_FROM_ALL)
69- set_target_properties (${TARGET} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE )
70- endif ()
71- endfunction ()
72-
73- # Helper function to recursively set EXCLUDE_FROM_DEFAULT_BUILD to FALSE on all targets "TARGET" depends on
74- function (_include_in_build TARGET )
75- if (TARGET ${TARGET} )
76- get_target_property (TYPE ${TARGET} TYPE )
77- if (TYPE MATCHES "INTERFACE" )
78- get_target_property (DEPS ${TARGET} INTERFACE_LINK_LIBRARIES )
79- else ()
80- set_target_properties (${TARGET} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD FALSE )
81- get_target_property (DEPS ${TARGET} LINK_LIBRARIES )
82- endif ()
83- if (DEPS)
84- foreach (D ${DEPS} )
85- _include_in_build (${D} )
86- endforeach ()
87- endif ()
88- endif ()
89- endfunction ()
90-
91- # Take executables as roots to run _include_in_build() on
92- function (target_link_libraries TARGET )
93- _target_link_libraries (${TARGET} ${ARGN} )
94-
95- get_target_property (_TYPE ${TARGET} TYPE )
96- if (_TYPE MATCHES "EXECUTABLE" )
97- _include_in_build (${TARGET} )
98- endif ()
99- endfunction ()
100-
101-
102-
103-
104-
105-
106-
10762add_subdirectory (mariadb-connector-c )
10863
10964CONFIGURE_FILE ("${CMAKE_CURRENT_BINARY_DIR} /mariadb-connector-c/include/mariadb_version.h"
0 commit comments