11# This file is just an orchestration
2- cmake_minimum_required (VERSION 3.16 ..3.31)
2+ cmake_minimum_required (VERSION 3.24 ..3.31)
33list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
44
55# Enable output of compile commands during generation.
@@ -54,8 +54,7 @@ if(UNIX)
5454 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR} /${OutputConfig} /${CMAKE_INSTALL_BINDIR} )
5555 endforeach ()
5656else ()
57- # Currently Only support static build for windows
58- option (BUILD_SHARED_LIBS "Build shared libraries (.dll)." OFF )
57+ option (BUILD_SHARED_LIBS "Build shared libraries (.dll)." ON )
5958 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /${CMAKE_INSTALL_BINDIR} )
6059 set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /${CMAKE_INSTALL_BINDIR} )
6160 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /${CMAKE_INSTALL_BINDIR} )
@@ -75,10 +74,7 @@ endif()
7574# Enable CCache if any
7675include (ccache)
7776
78- # Disable CTest targets
79- set_property (GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
80- include (CTest)
81-
77+ # Build deps
8278option (BUILD_ZLIB "Build the ZLIB dependency Library" ON )
8379message (STATUS "Build ZLIB: ${BUILD_ZLIB} " )
8480
@@ -91,6 +87,10 @@ message(STATUS "Build re2: ${BUILD_re2}")
9187option (BUILD_Protobuf "Build the Protobuf dependency Library" ON )
9288message (STATUS "Build protobuf: ${BUILD_Protobuf} " )
9389
90+ # Disable CTest targets
91+ set_property (GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
92+ include (CTest)
93+
9494if (BUILD_TESTING)
9595 option (BUILD_googletest "Build googletest" ON )
9696 option (BUILD_benchmark "Build benchmark" ON )
0 commit comments