Skip to content

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