@@ -37,49 +37,51 @@ if(MSVC)
37
37
target_compile_options (todaygraphql_nointrospection PUBLIC /wd4702)
38
38
endif ()
39
39
40
- # sample
41
- add_executable (sample sample.cpp)
42
- target_link_libraries (sample PRIVATE
43
- todaygraphql
44
- graphqljson)
45
-
46
- # sample_nointrospection
47
- add_executable (sample_nointrospection sample.cpp)
48
- target_link_libraries (sample_nointrospection PRIVATE
49
- todaygraphql_nointrospection
50
- graphqljson)
51
-
52
- # benchmark
53
- add_executable (benchmark benchmark.cpp)
54
- target_link_libraries (benchmark PRIVATE
55
- todaygraphql
56
- graphqljson)
57
-
58
- # benchmark_nointrospection
59
- add_executable (benchmark_nointrospection benchmark.cpp)
60
- target_link_libraries (benchmark_nointrospection PRIVATE
61
- todaygraphql_nointrospection
62
- graphqljson)
63
-
64
- if (WIN32 AND BUILD_SHARED_LIBS )
65
- add_custom_command (OUTPUT copied_sample_dlls
66
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
67
- $<TARGET_FILE:graphqlservice>
68
- $<TARGET_FILE:graphqljson>
69
- $<TARGET_FILE:graphqlpeg>
70
- $<TARGET_FILE:graphqlresponse>
71
- ${CMAKE_CURRENT_BINARY_DIR}
72
- COMMAND ${CMAKE_COMMAND} -E touch copied_sample_dlls
73
- DEPENDS
74
- graphqlservice
75
- graphqljson
76
- graphqlpeg
77
- graphqlresponse)
78
-
79
- add_custom_target (copy_today_sample_dlls DEPENDS copied_sample_dlls)
40
+ if (GRAPHQL_BUILD_MODULES)
41
+ # sample
42
+ add_executable (sample sample.cpp)
43
+ target_link_libraries (sample PRIVATE
44
+ todaygraphql
45
+ graphqljson)
80
46
81
- add_dependencies (sample copy_today_sample_dlls)
82
- add_dependencies (sample_nointrospection copy_today_sample_dlls)
83
- add_dependencies (benchmark copy_today_sample_dlls)
84
- add_dependencies (benchmark_nointrospection copy_today_sample_dlls)
47
+ # sample_nointrospection
48
+ add_executable (sample_nointrospection sample.cpp)
49
+ target_link_libraries (sample_nointrospection PRIVATE
50
+ todaygraphql_nointrospection
51
+ graphqljson)
52
+
53
+ # benchmark
54
+ add_executable (benchmark benchmark.cpp)
55
+ target_link_libraries (benchmark PRIVATE
56
+ todaygraphql
57
+ graphqljson)
58
+
59
+ # benchmark_nointrospection
60
+ add_executable (benchmark_nointrospection benchmark.cpp)
61
+ target_link_libraries (benchmark_nointrospection PRIVATE
62
+ todaygraphql_nointrospection
63
+ graphqljson)
64
+
65
+ if (WIN32 AND BUILD_SHARED_LIBS )
66
+ add_custom_command (OUTPUT copied_sample_dlls
67
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
68
+ $<TARGET_FILE:graphqlservice>
69
+ $<TARGET_FILE:graphqljson>
70
+ $<TARGET_FILE:graphqlpeg>
71
+ $<TARGET_FILE:graphqlresponse>
72
+ ${CMAKE_CURRENT_BINARY_DIR}
73
+ COMMAND ${CMAKE_COMMAND} -E touch copied_sample_dlls
74
+ DEPENDS
75
+ graphqlservice
76
+ graphqljson
77
+ graphqlpeg
78
+ graphqlresponse)
79
+
80
+ add_custom_target (copy_today_sample_dlls DEPENDS copied_sample_dlls)
81
+
82
+ add_dependencies (sample copy_today_sample_dlls)
83
+ add_dependencies (sample_nointrospection copy_today_sample_dlls)
84
+ add_dependencies (benchmark copy_today_sample_dlls)
85
+ add_dependencies (benchmark_nointrospection copy_today_sample_dlls)
86
+ endif ()
85
87
endif ()
0 commit comments