Skip to content
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

WIP Fix install. #556

Merged
merged 3 commits into from
Jan 29, 2019
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
5 changes: 3 additions & 2 deletions libshaderc/include/shaderc/shaderc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>

#include "libshaderc_util/common.h"
#include "libshaderc_util/visibility.h"
#include "shaderc/env.h"
#include "shaderc/status.h"
#include "shaderc/visibility.h"

// Source language kind.
typedef enum {
Expand Down
5 changes: 3 additions & 2 deletions libshaderc_spvc/include/shaderc/spvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>

#include "libshaderc_util/common.h"
#include "libshaderc_util/visibility.h"
#include "shaderc/env.h"
#include "shaderc/status.h"
#include "shaderc/visibility.h"

// An opaque handle to an object that manages all compiler state.
typedef struct shaderc_spvc_compiler* shaderc_spvc_compiler_t;
Expand Down
8 changes: 8 additions & 0 deletions libshaderc_util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ target_include_directories(shaderc_util
PUBLIC include PRIVATE ${glslang_SOURCE_DIR})

if(SHADERC_ENABLE_INSTALL)
install(
FILES
include/shaderc/env.h
include/shaderc/status.h
include/shaderc/visibility.h
DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/shaderc)

install(TARGETS shaderc_util
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef LIBSHADERC_UTIL_COMMON_H_
#define LIBSHADERC_UTIL_COMMON_H_
#ifndef SHADERC_ENV_H_
#define SHADERC_ENV_H_

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -42,19 +42,8 @@ typedef enum {
shaderc_env_version_opengl_4_5 = 450,
} shaderc_env_version;

// Indicate the status of a compilation.
typedef enum {
shaderc_compilation_status_success = 0,
shaderc_compilation_status_invalid_stage, // error stage deduction
shaderc_compilation_status_compilation_error,
shaderc_compilation_status_internal_error, // unexpected failure
shaderc_compilation_status_null_result_object,
shaderc_compilation_status_invalid_assembly,
shaderc_compilation_status_validation_error,
} shaderc_compilation_status;

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // LIBSHADERC_UTIL_COMMON_H_
#endif // SHADERC_ENV_H_
37 changes: 37 additions & 0 deletions libshaderc_util/include/shaderc/status.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2018 The Shaderc Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef SHADERC_STATUS_H_
#define SHADERC_STATUS_H_

#ifdef __cplusplus
extern "C" {
#endif

// Indicate the status of a compilation.
typedef enum {
shaderc_compilation_status_success = 0,
shaderc_compilation_status_invalid_stage, // error stage deduction
shaderc_compilation_status_compilation_error,
shaderc_compilation_status_internal_error, // unexpected failure
shaderc_compilation_status_null_result_object,
shaderc_compilation_status_invalid_assembly,
shaderc_compilation_status_validation_error,
} shaderc_compilation_status;

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // SHADERC_STATUS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef LIBSHADERC_UTIL_VISIBILITY_H_
#define LIBSHADERC_UTIL_VISIBILITY_H_
#ifndef SHADERC_VISIBILITY_H_
#define SHADERC_VISIBILITY_H_

// SHADERC_EXPORT tags symbol that will be exposed by the shared libraries.
#if defined(SHADERC_SHAREDLIB)
Expand All @@ -34,4 +34,4 @@
#define SHADERC_EXPORT
#endif

#endif // LIBSHADERC_UTIL_VISIBILITY_H_
#endif // SHADERC_VISIBILITY_H_