@@ -31,6 +31,32 @@ if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git")
3131 endif ()
3232endif ()
3333
34+ option (GRAPHQL_BUILD_SCHEMAGEN "Build the schemagen tool." ON )
35+ option (GRAPHQL_BUILD_CLIENTGEN "Build the clientgen tool." ON )
36+ option (GRAPHQL_BUILD_TESTS "Build the tests and sample schema library." ON )
37+
38+ if (GRAPHQL_BUILD_SCHEMAGEN)
39+ list (APPEND VCPKG_MANIFEST_FEATURES "schemagen" )
40+ endif ()
41+
42+ if (GRAPHQL_BUILD_CLIENTGEN)
43+ list (APPEND VCPKG_MANIFEST_FEATURES "clientgen" )
44+ endif ()
45+
46+ if (GRAPHQL_BUILD_TESTS)
47+ list (APPEND VCPKG_MANIFEST_FEATURES "tests" )
48+ endif ()
49+
50+ if (GRAPHQL_BUILD_SCHEMAGEN AND GRAPHQL_BUILD_CLIENTGEN)
51+ option (GRAPHQL_UPDATE_SAMPLES "Regenerate the sample schema sources whether or not we're building the tests." ON )
52+
53+ if (GRAPHQL_UPDATE_SAMPLES)
54+ list (APPEND VCPKG_MANIFEST_FEATURES "update-samples" )
55+ endif ()
56+ else ()
57+ set (GRAPHQL_UPDATE_SAMPLES OFF CACHE BOOL "Disable regenerating samples." FORCE)
58+ endif ()
59+
3460project (cppgraphqlgen VERSION ${LATEST_VERSION} )
3561
3662set (GRAPHQL_INSTALL_INCLUDE_DIR include CACHE PATH "Header file install directory" )
@@ -81,16 +107,6 @@ if(NOT pegtl_FOUND)
81107 add_subdirectory (PEGTL)
82108endif ()
83109
84- option (GRAPHQL_BUILD_SCHEMAGEN "Build the schemagen tool." ON )
85-
86- if (GRAPHQL_BUILD_SCHEMAGEN)
87- option (GRAPHQL_UPDATE_SAMPLES "Regenerate the sample schema sources whether or not we're building the tests." ON )
88- else ()
89- set (GRAPHQL_UPDATE_SAMPLES OFF CACHE BOOL "Disable regenerating samples." FORCE)
90- endif ()
91-
92- option (GRAPHQL_BUILD_CLIENTGEN "Build the clientgen tool." ON )
93-
94110option (GRAPHQL_UPDATE_VERSION "Regenerate graphqlservice/internal/Version.h and all of the version info rc files for Windows." ON )
95111
96112add_subdirectory (cmake)
0 commit comments