From 9106ca33677c0668f6bd3a04487326357bfb4826 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 6 Oct 2023 15:01:08 -0700 Subject: [PATCH 1/3] try changing build params --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e91bccf..a4b1a67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,12 +86,6 @@ else() add_library(Cram STATIC ${SOURCE_FILES}) endif() -# Build flags -if(NOT MSVC) - set_property(TARGET Cram PROPERTY COMPILE_FLAGS "-std=gnu99 -Wall -Wno-strict-aliasing -pedantic") - target_link_libraries(Cram PUBLIC m) -endif() - # includes target_include_directories(Cram PUBLIC $ -- 2.25.1 From 8163f5bcd5d0ab61a36aadbf129096fda5d0d4b4 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 6 Oct 2023 15:02:31 -0700 Subject: [PATCH 2/3] add library before linking --- CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4b1a67..9528b10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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,10 +86,11 @@ if(BUILD_CLI) endif() endif() -if(BUILD_SHARED_LIBS) - add_library(Cram SHARED ${SOURCE_FILES}) -else() - add_library(Cram STATIC ${SOURCE_FILES}) + +# Build flags +if(NOT MSVC) + set_property(TARGET Cram PROPERTY COMPILE_FLAGS "-std=gnu99 -Wall -Wno-strict-aliasing -pedantic") + target_link_libraries(Cram PUBLIC m) endif() # includes -- 2.25.1 From 7a43f1d19630f40b959b6535543f2bd35d92519b Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 6 Oct 2023 15:08:15 -0700 Subject: [PATCH 3/3] maybe we need to be specific --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 5e87878..8dcc844 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 -- 2.25.1