Skip to content

Commit

Permalink
Added CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
GlitchedPolygons committed Dec 29, 2019
1 parent 5003c2d commit 15cb40d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions CMakeLists.txt
@@ -0,0 +1,21 @@
# Copyright 2019 Raphael Beck
#
# 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.

cmake_minimum_required(VERSION 3.1)
project(chillbuff C)

set(CMAKE_C_STANDARD 11)

add_library(chillbuff INTERFACE)
target_include_directories(chillbuff INTERFACE include)
2 changes: 1 addition & 1 deletion include/chillbuff.h
Expand Up @@ -127,7 +127,7 @@ typedef struct chillbuff
static inline void _chillbuff_printerr(const char* error, const char* origin)
{
char error_msg[64 + strlen(error) + strlen(origin)];
sprintf_s(error_msg, sizeof(error_msg), "\nCHILLBUFF ERROR: (%s) %s\n", origin, error);
snprintf(error_msg, sizeof(error_msg), "\nCHILLBUFF ERROR: (%s) %s\n", origin, error);
if (_chillbuff_error_callback != NULL)
{
_chillbuff_error_callback(error_msg);
Expand Down

0 comments on commit 15cb40d

Please sign in to comment.