-
Notifications
You must be signed in to change notification settings - Fork 13
Fixes to get orcania building with MSVC #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the PR @madebr ! I've added a few comments in it, if you don't mind making the change (or challenging them!) I suppose there should be similar changes in yder and ulfius to make it work for your repo? |
CMakeLists.txt
Outdated
if (NOT MSVC) | ||
set_target_properties(orcania PROPERTIES | ||
COMPILE_OPTIONS -Wextra | ||
VERSION "${LIBRARY_VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Why is VERSION
parameter not included in MSVC build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I applied the least amount of changes to the cmake script.
VERSION
is mostly used for versioning .so
and .dylib
libraries. For dll's is changing a built-in version.
See VERSION
.
I have added a patch that improves (imho) the cmake script a bit by using targets.
I think it's still compatible with CMake 3.5.
ecdf4f3
to
8f18455
Compare
The 4th patch makes extensive use of CMake targets, instead of putting everything into variables. Create
With gcc on Linux, the cmake config files will be installed to |
994c1a7
to
ebcddbe
Compare
Thanks for the big help with the cmake script! Can you explain a little bit the purpose of the files installed in the
I would like to correctly understand the new features. |
ebcddbe
to
292310e
Compare
Sure, these files allow consumers of orcania to use it with the following script. cmake_minimum_required(VERSION 3.0)
project(my_program C)
find_package(Orcania 2.3.1 REQUIRED)
add_executable(my_program my_source.c)
target_link_libraries(my_program PRIVATE Orcania::Orcania)
|
So I could get rid of the custom files This refactor is very much appreciated! |
292310e
to
b733335
Compare
Yes, these Please hold on merging, because I want to test this on Linux too (working on Windows atm). I've marked it as a draft for the time being. |
Anyway, if you don't mind, I intend to merge not before a few days, until I understand the changes and make sure with my CI that the rest is fine too. |
FYI, these cmake config files are completely relocatable. |
b733335
to
8549f80
Compare
I verified this on Linux, and used it as a dependency for yder (see babelouest/yder#23) |
8549f80
to
855c02b
Compare
855c02b
to
0268992
Compare
@madebr , please let me know when you'll have a complete PR, because it's hard to follow-up with your push-forced commits |
I will stop force pushing then. I think this pr is finished. At the end of the ride, you can squash them. |
Awesome! I'll complete the review and my tests and I'll merge this PR and the other 2 then. Thanks again @madebr ! |
Sorry for the conflicts on your PRs @madebr , I'm still processing your new features, but I'm not ready yet to push them, stay tuned! |
Do you want me to fix the conflicts? |
Yes if you don't mind, thanks! |
52735b0
to
d3dbcbe
Compare
Friendly ping to ask whether you need any further help? |
Sorry, I have long days these times... I need to take a look at the 3 PRs at the same time, that's why it takes longer time. I'm not forgetting then though. |
Hello, I'm in the process with creating a conan recipe for ulfius, which has orcania as one of its dependencies.
By applying these patches, I am able to build this library with Visual Studio 2019.
ssize_t
is not available with Visual Studio. So I applied this suggestionBUILD_SHARED
cmake option.I have also fixed building a dll by setting the
WINDOWS_EXPORT_ALL_SYMBOLS
property.I was careful to not change the default behavior of the cmake script.
base64url.exe
also failed to build because the size of an array must be a constant.Fixes #29
Used in conan-io/conan-center-index#13589