-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add Basic CMake Support, Fix Conversion Test Compilation #28
base: master
Are you sure you want to change the base?
Conversation
Added a basic cmake lists script. Fixed the overload template usage in the conversion test, was causing a compiler error when using AppleClang. Added header include that shouldn't need to be included . The standard says that including it does nothing but on Windows MSVC when using the header as a standalone file it gave me an issue.
|
cmake_minimum_required(VERSION 3.14)
project(qoixx_sample LANGUAGES CXX)
include(CMake/CPM.cmake) # CPM module
CPMAddPackage("gh:wx257osn2/[email protected]")
add_executable(qoixx_sample "main.cpp")
target_link_libraries(qoixx_sample PUBLIC qoixx::qoixx) Here's an example CMake for this. |
@cullvox Sorry to late for reply, I tried to check the behavior. It seems that it works well for CPM (without above issue), but when we build qoixx with CMake, 3 binaries ( |
@wx257osn2 Hi, I'm providing a late reply too. I added an install for the |
add_library(qoixx INTERFACE) | ||
add_library(qoixx::qoixx ALIAS qoixx) | ||
target_include_directories(qoixx INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>) | ||
target_compile_definitions(qoixx INTERFACE QOIXX_DECODE_WITH_TABLES=${QOIXX_USE_TABLES}) |
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.
It will be -DQOIXX_DECODE_WITH_TABLES=ON
, but QOIXX_DECODE_WITH_TABLES
must be 0
or 1
. Please fix this
@cullvox Thank you for working it!
|
In one of my projects I'm working on it's useful to have support for CMake. I am using CPM, and to easily add a small library like this I think it might be useful to have some CMake support. What I added is just an interface library for the header and also compiling the test cases.
Usage of the overload template helper in the conversion test, was causing a compiler error when using AppleClang.