scapix-com / scapix

Scapix Language Bridge

Home Page:https://www.scapix.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[question] How to Install Scapix to CLion Project?

highjeans opened this issue · comments

@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:
Screen Shot 2021-02-16 at 12 28 29 PM

Also does Scapix work with C++20?

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.

So I add these lines to the CMakeLists.txt in my CLion Project?

Thanks for helping!