Skip to content
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

Shared Library for Visual Studio #220

Merged
merged 12 commits into from
Sep 15, 2019
Merged

Conversation

mikkoi
Copy link
Contributor

@mikkoi mikkoi commented Sep 8, 2019

Trying to create both a statically linked library and a shared library with CMake. Currently CMake build only builds a statically linked library. Earlier tests showed that it works in Linux but there were failures in older Visual Studios.

@mikkoi mikkoi force-pushed the so-for-visual-studio branch 3 times, most recently from 224b6d1 to d0d2000 Compare September 8, 2019 18:59
Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
We have tried to statically link the built libcompat into built libcheck
in CMake without success. With autotools (libtool et.al.) this is
most likely very easy but there is no support on Windows.
So instead of building libcompat separately
we incorporate the necessary parts of libcompat code
directly into libcheck when building libcheck.

Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Target check is specifically a static library
Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Variable PROJECT_VERSION was not yet in use when check_stdint.h configuration was updated.

Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
File check.pc.in is shared with Autotools and CMake build.

File uses variable 'VERSION'.

Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
For compatibility with the Autotools build which only
uses three parts: major, minor and patch.

CMake allows four components in version numbering:
major, minor, patch and tweak.

Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Removing the set(MEMORY_LEAKING_TESTS_ENABLED) which
had no effect on the build.

The new CMake build option uses verb-first structure
(do something on something: e.g. ENABLE/BUILD) like other build
options. The definition itself is "MEMORY_LEAKING_TESTS_ENABLED"
and only enabled in the tests/ subdirectory.

Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Already included in the project root CMakeLists.txt

Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
@mikkoi mikkoi changed the title Shared Library for Visual Studio - NOT FOR MERGING Shared Library for Visual Studio Sep 14, 2019
@brarcher brarcher merged commit ecf337c into libcheck:master Sep 15, 2019
@mikkoi mikkoi deleted the so-for-visual-studio branch September 16, 2019 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants