Skip to content

Commit

Permalink
Fix shared build windows
Browse files Browse the repository at this point in the history
  • Loading branch information
joakimono committed Oct 30, 2023
1 parent 0ef2f16 commit 1cf10e7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
3 changes: 3 additions & 0 deletions recipes/fmilibrary/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ patches:
- patch_file: "patches/2.4.1-009-link-zlib-in-fmilib.patch"
patch_description: "zlib must be linked explicitly due to minizip.c and miniunz.c inclusion"
patch_type: "conan"
- patch_file: "patches/2.4.1-010-install-runtime-to-bin.patch"
patch_description: "install runtime (dll) to bin instead of lib"
patch_type: "conan"
5 changes: 4 additions & 1 deletion recipes/fmilibrary/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from conan.tools.files import (
apply_conandata_patches, export_conandata_patches, get, copy, rmdir)
from conan.tools.scm import Version
from conan.tools.env import Environment
from conan.tools.env import Environment, VirtualRunEnv
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout

required_conan_version = ">=1.53.0"
Expand Down Expand Up @@ -102,6 +102,9 @@ def generate(self):
tc = CMakeDeps(self)
tc.generate()

vre = VirtualRunEnv(self)
vre.generate(scope="build")

def build(self):
apply_conandata_patches(self)
cmake = CMake(self)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 1c1fdb0d864682cb85433fc29cacbe829393eb1d Mon Sep 17 00:00:00 2001
From: Joakim Haugen <joakim.haugen@sintef.no>
Date: Mon, 30 Oct 2023 13:12:34 +0100
Subject: [PATCH] Install runtime to bin

---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc2a25c..0bb24f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -304,7 +304,7 @@ file(COPY "${FMILIBRARYHOME}/Config.cmake/fmilib.h" DESTINATION "${FMILibrary_BI
install(TARGETS ${FMILIB_TARGETS}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
- RUNTIME DESTINATION lib
+ RUNTIME DESTINATION bin
)
install(FILES
"${FMILIBRARYHOME}/FMILIB_Readme.txt"
--
2.30.2

0 comments on commit 1cf10e7

Please sign in to comment.