Fix windows build

This commit is contained in:
2026-02-20 21:29:36 -05:00
parent 376b0b5285
commit 28e31473a8
2 changed files with 13 additions and 4 deletions

View File

@@ -58,9 +58,17 @@ install(TARGETS c_control
)
# C++ API Library
add_library(control SHARED
if(WIN32)
add_library(control SHARED
${COMMON_SOURCES}
)
)
target_compile_definitions(control PRIVATE CONTROL_EXPORTS)
set_target_properties(control PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
else()
add_library(control SHARED
${COMMON_SOURCES}
)
endif()
target_include_directories(control PUBLIC include)
target_link_libraries(control

View File

@@ -7,13 +7,13 @@ from conan.tools.files import copy
class MyLibraryConan(ConanFile):
name = "libcontrol"
version = "1.0.0"
version = "1.0.2"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": True, "fPIC": True}
exports_sources = "CMakeLists.txt", "src/*", "include/*"
exports_sources = "CMakeLists.txt", "src/*", "include/*", "control.def"
def layout(self):
cmake_layout(self)
@@ -36,6 +36,7 @@ class MyLibraryConan(ConanFile):
def package_info(self):
self.cpp_info.libs = ["control"]
self.cpp_info.includedirs = ["include"]
def requirements(self):
self.requires("flatbuffers/24.12.23")