Skip to content

Commit

Permalink
Updated cmake to generate a dynamic library. Update Unix build instru…
Browse files Browse the repository at this point in the history
…ctions
  • Loading branch information
YannickComteNovelab committed Aug 10, 2023
1 parent 0d90ab4 commit 951ea6e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
3 changes: 0 additions & 3 deletions UnrealEngine/CleanProject.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@



#!/bin/bash

rm -rf *.vs
Expand Down
11 changes: 4 additions & 7 deletions UnrealEngine/README-Unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ This document describes how to build the JSBSim library as well as the Unreal En
The first step is to build JSBSim on your target platform using cmake. Open an terminal and type the following commands

### For Macos
On macos you've to install Julia first, for instance using homebrew with the following command `brew install julia`.


```bash
mkdir -p build && cd build
julia -e "import Pkg;Pkg.add(\"CxxWrap\")"
export CXXWRAP_PREFIX_PATH=`julia -e "using CxxWrap;print(CxxWrap.prefix_path())"`
cmake -DCMAKE_INCLUDE_PATH=$PWD/../cxxtest -DBUILD_JULIA_PACKAGE=ON -DCYTHON_FLAGS="-X embedsignature=True" -DCMAKE_PREFIX_PATH=$CXXWRAP_PREFIX_PATH ..
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-stdlib=libc++" ..
make -j4
```

Expand All @@ -45,7 +42,7 @@ rsync -avm --include='*.h' --include='*.hpp' --include='*.hxx' -f 'hide,! */' sr

# Copy the JSBSim library (Macos)
mkdir -p UnrealEngine/Plugins/JSBSimFlightDynamicsModel/Source/ThirdParty/JSBSim/Lib/Mac/
cp -Rf build/julia/libJSBSimJL.dylib UnrealEngine/Plugins/JSBSimFlightDynamicsModel/Source/ThirdParty/JSBSim/Lib/Mac/libJSBSim.dylib
cp -Rf build/src/libJSBSim.1.2.0.dev1.dylib UnrealEngine/Plugins/JSBSimFlightDynamicsModel/Source/ThirdParty/JSBSim/Lib/Mac/libJSBSim.dylib

# Copy the JSBSim library (Linux)
mkdir -p UnrealEngine/Plugins/JSBSimFlightDynamicsModel/Source/ThirdParty/JSBSim/Lib/Linux/
Expand Down
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ endif()

if(BUILD_SHARED_LIBS)
set_target_properties(libJSBSim PROPERTIES
SOVERSION ${LIBRARY_SOVERSION}
FRAMEWORK ON)
SOVERSION ${LIBRARY_SOVERSION})
install(TARGETS libJSBSim LIBRARY DESTINATION lib
NAMELINK_SKIP
COMPONENT runtime
Expand Down

0 comments on commit 951ea6e

Please sign in to comment.