Skip to content

Commit 93b7f10

Browse files
committed
Use file(GLOB) for copy_if_different
1 parent d720bcb commit 93b7f10

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/introspection/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/cppgraphqlgen-functions.cmake)
99
if(GRAPHQL_UPDATE_SAMPLES)
1010
update_graphql_schema_files(introspection schema.introspection.graphql Introspection introspection --introspection)
1111

12+
file(GLOB PRIVATE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
1213
add_custom_command(
1314
OUTPUT copied_introspection_schema_headers
14-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/../../include/graphqlservice/introspection/
15+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PRIVATE_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/../../include/graphqlservice/introspection/
1516
COMMAND ${CMAKE_COMMAND} -E touch copied_introspection_schema_headers
1617
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/introspection_schema_files
1718
COMMENT "Updating IntrospectionSchema headers")
@@ -20,7 +21,7 @@ if(GRAPHQL_UPDATE_SAMPLES)
2021
DEPENDS copied_introspection_schema_headers)
2122
endif()
2223

23-
file(GLOB SCHEMA_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../include/graphqlservice/introspection/*.h)
24-
install(FILES ${SCHEMA_FILES}
24+
file(GLOB PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../../include/graphqlservice/introspection/*.h)
25+
install(FILES ${PUBLIC_HEADERS}
2526
CONFIGURATIONS ${GRAPHQL_INSTALL_CONFIGURATIONS}
2627
DESTINATION ${GRAPHQL_INSTALL_INCLUDE_DIR}/graphqlservice/introspection)

0 commit comments

Comments
 (0)