Skip to content

Add all generated files to the repo and fix dependencies #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Debug/
Release/
Testing/
Win32/
/include/graphqlservice/introspection/IntrospectionSchema.h
/IntrospectionSchema.h
/IntrospectionSchema.cpp
*.filters
*.vcxproj
Expand Down
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@

cmake_minimum_required(VERSION 3.8.2)

# Enable CMAKE_MSVC_RUNTIME_LIBRARY on Windows.
cmake_policy(SET CMP0091 NEW)
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.15")
# Enable CMAKE_MSVC_RUNTIME_LIBRARY on Windows.
set(MSVC_MATCH_VCPKG_TRIPLET ON)
cmake_policy(SET CMP0091 NEW)
endif()

# Default to the last updated version from version.txt.
file(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.txt" VERSION_FILE)
Expand Down Expand Up @@ -42,7 +45,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries instead of static libs" OFF)
if(VCPKG_TARGET_TRIPLET)
message(STATUS "Using ${VCPKG_TARGET_TRIPLET} triplet with vcpkg")

if(MSVC)
if(MSVC AND MSVC_MATCH_VCPKG_TRIPLET)
# Match the MSVC runtime if we're using VCPKG with static libraries.
if(VCPKG_TARGET_TRIPLET MATCHES [[^.+-static$]])
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
Expand All @@ -51,9 +54,6 @@ if(VCPKG_TARGET_TRIPLET)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
message(STATUS "Using MSVC runtime DLL")
endif()

add_custom_target(output_msvc_runtime ALL
${CMAKE_COMMAND} -E echo "Using ${CMAKE_MSVC_RUNTIME_LIBRARY} MSVC runtime to match ${VCPKG_TARGET_TRIPLET}")
endif()
endif()

Expand Down Expand Up @@ -84,6 +84,8 @@ else()
set(GRAPHQL_UPDATE_SAMPLES OFF CACHE BOOL "Disable regenerating samples." FORCE)
endif()

option(GRAPHQL_UPDATE_VERSION "Regenerate graphqlservice/internal/Version.h and all of the version info rc files for Windows." ON)

add_subdirectory(cmake)
add_subdirectory(src)

Expand Down
21 changes: 21 additions & 0 deletions include/graphqlservice/internal/Version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#pragma once

#ifndef VERSION_H
#define VERSION_H

#include <string_view>

namespace graphql::internal {

constexpr std::string_view FullVersion { "3.4.1" };

constexpr size_t MajorVersion = 3;
constexpr size_t MinorVersion = 4;
constexpr size_t PatchVersion = 1;

} // namespace graphql::internal

#endif // VERSION_H
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// WARNING! Do not edit this file manually, your changes will be overwritten.

#pragma once

#ifndef INTROSPECTIONSCHEMA_H
Expand Down
43 changes: 43 additions & 0 deletions res/SchemaGen.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include <winver.h>

#define SCHEMAGEN_RC_VERSION 3,4,1,0
#define SCHEMAGEN_RC_VERSION_STR "3.4.1"

#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION SCHEMAGEN_RC_VERSION
PRODUCTVERSION SCHEMAGEN_RC_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Microsoft Corporation"
VALUE "FileDescription", "Code generator for https://github.com/microsoft/cppgraphqlgen"
VALUE "FileVersion", SCHEMAGEN_RC_VERSION_STR
VALUE "InternalName", "schemagen"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License."
VALUE "OriginalFilename", "schemagen.exe"
VALUE "ProductName", "CppGraphQLGen"
VALUE "ProductVersion", SCHEMAGEN_RC_VERSION_STR
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
43 changes: 43 additions & 0 deletions res/graphqljson_version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include <winver.h>

#define GRAPHQL_RC_VERSION 3,4,1,0
#define GRAPHQL_RC_VERSION_STR "3.4.1"

#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION GRAPHQL_RC_VERSION
PRODUCTVERSION GRAPHQL_RC_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Microsoft Corporation"
VALUE "FileDescription", "Shared library for https://github.com/microsoft/cppgraphqlgen"
VALUE "FileVersion", GRAPHQL_RC_VERSION_STR
VALUE "InternalName", "graphqljson"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License."
VALUE "OriginalFilename", "graphqljson.dll"
VALUE "ProductName", "CppGraphQLGen"
VALUE "ProductVersion", GRAPHQL_RC_VERSION_STR
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
43 changes: 43 additions & 0 deletions res/graphqlpeg_version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include <winver.h>

#define GRAPHQL_RC_VERSION 3,4,1,0
#define GRAPHQL_RC_VERSION_STR "3.4.1"

#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION GRAPHQL_RC_VERSION
PRODUCTVERSION GRAPHQL_RC_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Microsoft Corporation"
VALUE "FileDescription", "Shared library for https://github.com/microsoft/cppgraphqlgen"
VALUE "FileVersion", GRAPHQL_RC_VERSION_STR
VALUE "InternalName", "graphqlpeg"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License."
VALUE "OriginalFilename", "graphqlpeg.dll"
VALUE "ProductName", "CppGraphQLGen"
VALUE "ProductVersion", GRAPHQL_RC_VERSION_STR
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
43 changes: 43 additions & 0 deletions res/graphqlresponse_version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include <winver.h>

#define GRAPHQL_RC_VERSION 3,4,1,0
#define GRAPHQL_RC_VERSION_STR "3.4.1"

#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION GRAPHQL_RC_VERSION
PRODUCTVERSION GRAPHQL_RC_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Microsoft Corporation"
VALUE "FileDescription", "Shared library for https://github.com/microsoft/cppgraphqlgen"
VALUE "FileVersion", GRAPHQL_RC_VERSION_STR
VALUE "InternalName", "graphqlresponse"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License."
VALUE "OriginalFilename", "graphqlresponse.dll"
VALUE "ProductName", "CppGraphQLGen"
VALUE "ProductVersion", GRAPHQL_RC_VERSION_STR
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
43 changes: 43 additions & 0 deletions res/graphqlservice_nointrospection_version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include <winver.h>

#define GRAPHQL_RC_VERSION 3,4,1,0
#define GRAPHQL_RC_VERSION_STR "3.4.1"

#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION GRAPHQL_RC_VERSION
PRODUCTVERSION GRAPHQL_RC_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Microsoft Corporation"
VALUE "FileDescription", "Shared library for https://github.com/microsoft/cppgraphqlgen"
VALUE "FileVersion", GRAPHQL_RC_VERSION_STR
VALUE "InternalName", "graphqlservice_nointrospection"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License."
VALUE "OriginalFilename", "graphqlservice_nointrospection.dll"
VALUE "ProductName", "CppGraphQLGen"
VALUE "ProductVersion", GRAPHQL_RC_VERSION_STR
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
43 changes: 43 additions & 0 deletions res/graphqlservice_version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include <winver.h>

#define GRAPHQL_RC_VERSION 3,4,1,0
#define GRAPHQL_RC_VERSION_STR "3.4.1"

#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION GRAPHQL_RC_VERSION
PRODUCTVERSION GRAPHQL_RC_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Microsoft Corporation"
VALUE "FileDescription", "Shared library for https://github.com/microsoft/cppgraphqlgen"
VALUE "FileVersion", GRAPHQL_RC_VERSION_STR
VALUE "InternalName", "graphqlservice"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License."
VALUE "OriginalFilename", "graphqlservice.dll"
VALUE "ProductName", "CppGraphQLGen"
VALUE "ProductVersion", GRAPHQL_RC_VERSION_STR
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
Loading