[question] How to Install Scapix to CLion Project?
highjeans opened this issue · comments
Vivan Waghela commented
@Boris-Rasin I am developing an IOS app and I wanted to use Scapix in it. For the c++ files I am using CLion. Where should I clone the scapix repo to use it? Here is my project structure:
Vivan Waghela commented
Also does Scapix work with C++20?
Boris Rasin commented
You don't need to clone Scapix repository.
You need to modify your CLion CMakeLists.txt
project file to use Scapix.
See these examples:
CMakeLists.txt
CMakeLists.txt
You need to add these lines:
include(FetchContent)
FetchContent_Declare(
cmodule
URL "https://github.com/scapix-com/cmodule/archive/v1.0.27.tar.gz"
URL_HASH SHA256=02c767f8fededb8b3bc410ceb0565e0d3a58b478f0de9dc3bba92d9d371e65f3
)
FetchContent_MakeAvailable(cmodule)
find_package(Scapix REQUIRED)
scapix_bridge_headers(
<TARGET> # replace this with your target name
"com.example.chat" # replace this with your app domain
"source/chat/contact.h" # replace these with your headers path names
"source/chat/session.h"
)
And yes, Scapix works with C++20.
Vivan Waghela commented
So I add these lines to the CMakeLists.txt in my CLion Project?
Boris Rasin commented
Yes
Vivan Waghela commented
Thanks for helping!