Skip to content

Commit d6bf786

Browse files
authored
Merge pull request #109 from wravery/master
Full fix for #105
2 parents cd78984 + cd08341 commit d6bf786

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ endfunction()
1212

1313
# graphqlpeg
1414
add_library(graphqlpeg GraphQLTree.cpp)
15+
add_library(cppgraphqlgen::graphqlpeg ALIAS graphqlpeg)
1516
target_link_libraries(graphqlpeg PUBLIC taocpp::pegtl)
1617
target_include_directories(graphqlpeg PUBLIC
1718
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
@@ -27,6 +28,7 @@ endif()
2728

2829
# graphqlresponse
2930
add_library(graphqlresponse GraphQLResponse.cpp)
31+
add_library(cppgraphqlgen::graphqlresponse ALIAS graphqlresponse)
3032
target_include_directories(graphqlresponse PUBLIC
3133
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
3234
$<INSTALL_INTERFACE:${GRAPHQL_INSTALL_INCLUDE_DIR}>)
@@ -40,6 +42,7 @@ endif()
4042
# schemagen
4143
if(GRAPHQL_BUILD_SCHEMAGEN)
4244
add_executable(schemagen SchemaGenerator.cpp)
45+
add_executable(cppgraphqlgen::schemagen ALIAS schemagen)
4346
target_link_libraries(schemagen PRIVATE
4447
graphqlpeg
4548
graphqlresponse)
@@ -95,6 +98,7 @@ else()
9598
OUTPUT
9699
${CMAKE_CURRENT_BINARY_DIR}/../IntrospectionSchema.cpp
97100
${CMAKE_CURRENT_BINARY_DIR}/../include/graphqlservice/IntrospectionSchema.h
101+
COMMAND ${CMAKE_COMMAND} -E make_directory include/graphqlservice
98102
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../samples/introspection/IntrospectionSchema.cpp .
99103
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../samples/introspection/IntrospectionSchema.h include/graphqlservice
100104
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/..
@@ -107,6 +111,7 @@ add_library(graphqlservice
107111
Introspection.cpp
108112
Validation.cpp
109113
${CMAKE_CURRENT_BINARY_DIR}/../IntrospectionSchema.cpp)
114+
add_library(cppgraphqlgen::graphqlservice ALIAS graphqlservice)
110115
target_link_libraries(graphqlservice PUBLIC
111116
graphqlpeg
112117
Threads::Threads)
@@ -133,6 +138,7 @@ if(GRAPHQL_USE_RAPIDJSON)
133138

134139
set(BUILD_GRAPHQLJSON ON)
135140
add_library(graphqljson JSONResponse.cpp)
141+
add_library(cppgraphqlgen::graphqljson ALIAS graphqljson)
136142
target_link_libraries(graphqljson PUBLIC graphqlresponse)
137143
target_include_directories(graphqljson SYSTEM PRIVATE ${RAPIDJSON_INCLUDE_DIRS})
138144

0 commit comments

Comments
 (0)