Compare commits

...

3 Commits
1.1.0 ... main

Author SHA1 Message Date
cosmonaut c0dbc791e6 define separator on apple
continuous-integration/drone/push Build is passing Details
2024-01-30 17:39:41 -08:00
cosmonaut 08ac44514e 1.1.1
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
2023-10-06 15:12:28 -07:00
cosmonaut 8c32994d4f Fix windows exe generation (#2)
continuous-integration/drone/push Build is passing Details
MinGW is not respecting the BUILD_SHARED_LIBS default value. Cool!

Reviewed-on: #2
2023-10-06 22:10:55 +00:00
3 changed files with 13 additions and 8 deletions

View File

@ -17,7 +17,7 @@ steps:
commands:
- cmake -E make_directory ./windows-build
- cd ./windows-build
- mingw64-cmake -S .. -B .
- mingw64-cmake -DBUILD_SHARED_LIBS=OFF -S .. -B .
- make
- name: gitea_release

View File

@ -6,7 +6,7 @@ option(BUILD_SHARED_LIBS "Build shared library" OFF)
SET(LIB_MAJOR_VERSION "1")
SET(LIB_MINOR_VERSION "1")
SET(LIB_REVISION "0")
SET(LIB_REVISION "1")
SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}")
# Build Type
@ -56,6 +56,12 @@ if(BUILD_SHARED_LIBS)
set(LINKSTYLE PUBLIC)
endif()
if(BUILD_SHARED_LIBS)
add_library(Cram SHARED ${SOURCE_FILES})
else()
add_library(Cram STATIC ${SOURCE_FILES})
endif()
if(BUILD_CLI)
file(GLOB CLI_SOURCES
tools/cli/lib/stb_image_write.h
@ -80,11 +86,6 @@ if(BUILD_CLI)
endif()
endif()
if(BUILD_SHARED_LIBS)
add_library(Cram SHARED ${SOURCE_FILES})
else()
add_library(Cram STATIC ${SOURCE_FILES})
endif()
# Build flags
if(NOT MSVC)

View File

@ -54,6 +54,10 @@
#define SEPARATOR '/'
#endif
#ifdef __APPLE__
#define SEPARATOR '/'
#endif
#ifndef max
#define max(x, y) (((x) > (y)) ? (x) : (y))
#endif
@ -69,7 +73,7 @@ extern "C"
#define CRAM_MAJOR_VERSION 1
#define CRAM_MINOR_VERSION 1
#define CRAM_PATCH_VERSION 0
#define CRAM_PATCH_VERSION 1
#define CRAM_COMPILED_VERSION ( \
(CRAM_MAJOR_VERSION * 100 * 100) + \