Skip to content

Instantly share code, notes, and snippets.

@durfejs
Last active September 19, 2022 07:56
Show Gist options
  • Save durfejs/c1cb83f36bac4c047501c7af27597ea7 to your computer and use it in GitHub Desktop.
Save durfejs/c1cb83f36bac4c047501c7af27597ea7 to your computer and use it in GitHub Desktop.
ICES Desktop Windows IDE project steps

ICES Desktop Windows IDE project steps

1st TRY
2nd TRY
3rd TRY
4th TRY

1st TRY

Basic Java JNI Project

As a basis we take Application with JNI Library from Nokee. Download GroovyDSL extract to a folder. Move the folder to Empty VSCode. I am using Java 18 therefore I need to VSCode promts me to upgrade to Gradle 7.3.1 Gradle Projects->jvm-application-with-jni-library->Tasks->Build Gradle Projects->jvm-application-with-jni-library->Tasks->Application->Run

KFR library

Move downladed forlder with kfr cloned library to Empty VSCode CMake will promt for build environment. Select the appropriate (Clang) CMake -> Build All Projects (Icon) Create subfolder dependencies/kfr in jni-library folder of the above JNI project Copy the *.lib and *.h files and include subfolder from kfrlib folder to above newly created folder

2nd TRY

Create Java Project in Visual Studion Code

  1. Show All Commands Java: Create Java Project
  2. Select project type: Gradle
  3. In Select Target Folder Window create a folder for workspace
  4. Select build script DSL : Groovy
  5. Input name of the project

Test what has been created

  1. Gradle Projects under project select Tasks->build->build
  2. Gradle Projects under project select Tasks->application->run
  3. Should show in terminal "Hello World!"

CMake support

  1. First create source cpp folder under app/src/main
  2. Adjust Workspace settings for CMake : Show All Commands Preferences: Open User Settings in Extensions under CMake Tools adjust

CMake: Build Directory ${workspaceFolder}/build* to ${workspaceFolder}/app/build CMake: Source Direcory ${workspaceFolder} to ${workspaceFolder}/app/src/main/cpp

  1. Show All Commands CMake: Quick Start
  2. Enter name of the project
  3. Create an executable

Test what has been created

  1. Show ALl Commands CMake: Configure, CMake: Build, CMake: Debug
  2. Shoud show in terminal "Hello World"!

Create JavaFX Modular project with Gradle

Following instructions

KFR Lib

KFR will be included in CMake project which was set up previously Cometa needs C++14 therefore we need to add this to CMakeLists.txt

 if (CMAKE_VERSION VERSION_GREATER 3.12)
   set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
 endif()

And for KFR these lines needs to be added to CMakeLists.txt

add_subdirectory (C:/Users/msd/DSP/kfr kfr)

include_directories(C:/Users/msd/DSP/kfr/include)
include_directories("C:/Program Files/Java/jdk-18.0.1.1/include")
include_directories("C:/Program Files/Java/jdk-18.0.1.1/include/win32")

# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.

target_link_libraries(kfr INTERFACE)
target_link_libraries(kfr_dft)
target_link_libraries(kfr_io)

3rd TRY

Basic IDE setup

Apache NetBeans IDE is used. C/C++ plugin is needded. Following this YouTube tutorial. Everything is explained in the video. At the end of the video the guy says Eclipse is better due to outdated C/C++ plugin for NetBeans

4th TRY

Basic IDE setup

After browsing on Google I found this YouTube turorial. It is an Eclipse project. Just follow all the steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment