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

CMake Support #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

CMake Support #37

wants to merge 1 commit into from

Conversation

dylanetaft
Copy link

@dylanetaft dylanetaft commented Oct 19, 2024

Add CMake support. This works cross platform, tested on Ubuntu, MSYS2 + CLANG on Windows, and Visual Studio on Windows.

Works with FetchContent, ie

include(FetchContent)

FetchContent_Declare(
mimetic
GIT_REPOSITORY "https://github.com/dylanetaft/mimetic"
OVERRIDE_FIND_PACKAGE
)
find_package(mimetic REQUIRED)

or ExternalProject in a superbuild.
ExternalProject_Add(
mimetic
GIT_REPOSITORY https://github.com/dylanetaft/mimetic
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
-DBUILD_STATIC_LIBS=ON
-DBUILD_SHARED_LIBS=OFF
)

Also can build a pkg-conf .pc for integration with other build environments, but only tested with shared lib.

This cmake only builds library, does not build test cases or example or doxygen docs.

@dylanetaft
Copy link
Author

The benefit to this is easier integration into projects cross platforms as CMake is popular.

@dylanetaft dylanetaft mentioned this pull request Oct 19, 2024
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.

1 participant