Skip to content

Commit e4dbc06

Browse files
committed
Build static or shared libraries depending on the platform/default settings
1 parent 3a7edcd commit e4dbc06

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CTestCostData.txt
1919
CTestTestfile.cmake
2020
install_manifest.txt
2121
LastTest.log
22+
lib*.a
2223
lib*.so
2324
Makefile
2425
schemagen

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if(WIN32)
99
SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
1010
endif()
1111

12-
add_library(graphqlservice SHARED GraphQLService.cpp Introspection.cpp IntrospectionSchema.cpp)
12+
add_library(graphqlservice GraphQLService.cpp Introspection.cpp IntrospectionSchema.cpp)
1313
add_executable(schemagen SchemaGenerator.cpp)
1414

1515
find_library(GRAPHQLPARSER graphqlparser)
@@ -50,7 +50,7 @@ if(BUILD_TESTS OR UPDATE_SAMPLES)
5050
)
5151

5252
if(BUILD_TESTS)
53-
add_library(todaygraphql SHARED
53+
add_library(todaygraphql
5454
TodaySchema.cpp
5555
Today.cpp)
5656

@@ -99,6 +99,7 @@ endif()
9999
install(TARGETS graphqlservice schemagen
100100
EXPORT cppgraphqlgen-config
101101
RUNTIME DESTINATION bin
102+
ARCHIVE DESTINATION lib
102103
LIBRARY DESTINATION lib)
103104

104105
install(FILES GraphQLService.h Introspection.h IntrospectionSchema.h

0 commit comments

Comments
 (0)