@@ -38,29 +38,31 @@ if(WIN32 AND BUILD_SHARED_LIBS)
3838endif ()
3939
4040# schemagen
41- add_executable (schemagen SchemaGenerator.cpp)
42- target_link_libraries (schemagen PRIVATE
43- graphqlpeg
44- graphqlresponse)
45- add_bigobj_flag(schemagen)
46-
47- set (BOOST_COMPONENTS program_options)
48- set (BOOST_LIBRARIES Boost::program_options)
49-
50- if (NOT MSVC )
51- set (BOOST_COMPONENTS ${BOOST_COMPONENTS} filesystem)
52- set (BOOST_LIBRARIES ${BOOST_LIBRARIES} Boost::filesystem)
53- target_compile_options (schemagen PRIVATE -DUSE_BOOST_FILESYSTEM)
41+ if (GRAPHQL_BUILD_SCHEMAGEN)
42+ add_executable (schemagen SchemaGenerator.cpp)
43+ target_link_libraries (schemagen PRIVATE
44+ graphqlpeg
45+ graphqlresponse)
46+ add_bigobj_flag(schemagen)
47+
48+ set (BOOST_COMPONENTS program_options)
49+ set (BOOST_LIBRARIES Boost::program_options)
50+
51+ if (NOT MSVC )
52+ set (BOOST_COMPONENTS ${BOOST_COMPONENTS} filesystem)
53+ set (BOOST_LIBRARIES ${BOOST_LIBRARIES} Boost::filesystem)
54+ target_compile_options (schemagen PRIVATE -DUSE_BOOST_FILESYSTEM)
55+ endif ()
56+
57+ find_package (Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS} )
58+ target_link_libraries (schemagen PRIVATE ${BOOST_LIBRARIES} )
59+
60+ install (TARGETS schemagen
61+ EXPORT cppgraphqlgen-targets
62+ RUNTIME DESTINATION ${GRAPHQL_INSTALL_TOOLS_DIR} /${PROJECT_NAME}
63+ CONFIGURATIONS Release)
5464endif ()
5565
56- find_package (Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS} )
57- target_link_libraries (schemagen PRIVATE ${BOOST_LIBRARIES} )
58-
59- install (TARGETS schemagen
60- EXPORT cppgraphqlgen-targets
61- RUNTIME DESTINATION ${GRAPHQL_INSTALL_TOOLS_DIR} /${PROJECT_NAME}
62- CONFIGURATIONS Release)
63-
6466# introspection
6567if (GRAPHQL_UPDATE_SAMPLES)
6668 add_custom_command (
0 commit comments