--- utilities/CMakeLists.txt.orig 2020-09-23 12:37:48 UTC +++ utilities/CMakeLists.txt @@ -23,13 +23,19 @@ ADD_WSHADOW_WARNING() DISABLE_MISSING_PROFILE_WARNING() -IF(NOT CMAKE_CROSSCOMPILING) +IF(WITHOUT_CLIENTLIBS) MYSQL_ADD_EXECUTABLE(comp_err comp_err.cc COMPONENT Test LINK_LIBRARIES mysys + SKIP_INSTALL) +ELSE(WITHOUT_CLIENTLIBS) + MYSQL_ADD_EXECUTABLE(comp_err + comp_err.cc + COMPONENT Test + LINK_LIBRARIES mysys ) -ENDIF() +ENDIF(WITHOUT_CLIENTLIBS) MYSQL_ADD_EXECUTABLE(comp_client_err comp_client_err.cc @@ -112,10 +118,30 @@ MYSQL_ADD_EXECUTABLE(static_thread_local_test EXCLUDE_FROM_ALL ) +IF(WITHOUT_CLIENTLIBS) MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.cc COMPONENT Server LINK_LIBRARIES mysys + SKIP_INSTALL ) +MYSQL_ADD_EXECUTABLE(perror + perror.cc + COMPONENT Server + DEPENDENCIES GenError + LINK_LIBRARIES mysys + SKIP_INSTALL ) +IF(BUILD_BUNDLED_LZ4) + MYSQL_ADD_EXECUTABLE(lz4_decompress + lz4_decompress.cc + COMPONENT Server + LINK_LIBRARIES ${LZ4_LIBRARY} mysys + SKIP_INSTALL ) +ENDIF() +ELSE(WITHOUT_CLIENTLIBS) +MYSQL_ADD_EXECUTABLE(my_print_defaults + my_print_defaults.cc + COMPONENT Server + LINK_LIBRARIES mysys ) MYSQL_ADD_EXECUTABLE(perror perror.cc @@ -130,12 +156,23 @@ IF(BUILD_BUNDLED_LZ4) LINK_LIBRARIES ${LZ4_LIBRARY} mysys ) ENDIF() +ENDIF(WITHOUT_CLIENTLIBS) +IF(WITHOUT_CLIENTLIBS) MYSQL_ADD_EXECUTABLE(zlib_decompress zlib_decompress.cc COMPONENT Server LINK_LIBRARIES ${ZLIB_LIBRARY} mysys + SKIP_INSTALL ) +ELSE(WITHOUT_CLIENTLIBS) +IF(BUILD_BUNDLED_ZLIB OR NOT OPENSSL_EXECUTABLE_HAS_ZLIB) + MYSQL_ADD_EXECUTABLE(zlib_decompress + zlib_decompress.cc + COMPONENT Server + LINK_LIBRARIES ${ZLIB_LIBRARY} mysys ) +ENDIF() +ENDIF(WITHOUT_CLIENTLIBS) # All targets below belong to COMPONENT Server and depend on InnoDB. IF(WITHOUT_SERVER)