@@ -48,17 +48,17 @@ install(TARGETS schemagen
48
48
CONFIGURATIONS Release )
49
49
50
50
# introspection
51
- add_custom_command (
52
- OUTPUT
53
- ${CMAKE_CURRENT_BINARY_DIR} /../IntrospectionSchema.cpp
54
- ${CMAKE_CURRENT_BINARY_DIR} /../include/graphqlservice/IntrospectionSchema.h
55
- COMMAND ${CMAKE_COMMAND} -E make_directory include /graphqlservice
56
- COMMAND schemagen --introspection
57
- DEPENDS schemagen
58
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /..
59
- COMMENT "Generating IntrospectionSchema files" )
60
-
61
51
if (GRAPHQL_UPDATE_SAMPLES )
52
+ add_custom_command (
53
+ OUTPUT
54
+ ${CMAKE_CURRENT_BINARY_DIR} /../IntrospectionSchema.cpp
55
+ ${CMAKE_CURRENT_BINARY_DIR} /../include/graphqlservice/IntrospectionSchema.h
56
+ COMMAND ${CMAKE_COMMAND} -E make_directory include /graphqlservice
57
+ COMMAND schemagen --introspection
58
+ DEPENDS schemagen
59
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /..
60
+ COMMENT "Generating IntrospectionSchema files" )
61
+
62
62
file (GLOB OLD_INTROSPECTION_FILES ${CMAKE_CURRENT_SOURCE_DIR} /../samples/introspection/* )
63
63
64
64
add_custom_command (
@@ -74,6 +74,15 @@ if(GRAPHQL_UPDATE_SAMPLES)
74
74
75
75
add_custom_target (update_introspection ALL
76
76
DEPENDS updated_introspection )
77
+ else ()
78
+ add_custom_command (
79
+ OUTPUT
80
+ ${CMAKE_CURRENT_BINARY_DIR} /../IntrospectionSchema.cpp
81
+ ${CMAKE_CURRENT_BINARY_DIR} /../include/graphqlservice/IntrospectionSchema.h
82
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR} /../samples/introspection/IntrospectionSchema.cpp .
83
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR} /../samples/introspection/IntrospectionSchema.h include /graphqlservice
84
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /..
85
+ COMMENT "Copying IntrospectionSchema files" )
77
86
endif ()
78
87
79
88
# graphqlservice
0 commit comments