Commit aa02c297 authored by Evgeny Kusmenko's avatar Evgeny Kusmenko
Browse files

Merge branch 'richter-dev' into 'master'

Richter dev

See merge request !22
parents f54ba48b 46971d81
Pipeline #81602 failed with stages
in 15 minutes and 27 seconds
......@@ -8,7 +8,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-generator</artifactId>
<version>0.0.26-SNAPSHOT</version>
<version>0.0.27-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......
......@@ -49,7 +49,7 @@ public class CMakeConfig {
private CMakeListsCPPViewModel cMakeListsViewModel = new CMakeListsCPPViewModel();
private HashSet<CMakeFindModule> moduleList = new HashSet<>();
private List<CMakeFindModule> moduleList = new ArrayList<>();
private List<String> cmakeCommandList = new ArrayList<>();
......
......@@ -19,7 +19,7 @@ public class CMakeListsCPPViewModel extends ViewModelBase {
// fields
private String compName;
private HashSet<CMakeFindModule> moduleDependencies;
private List<CMakeFindModule> moduleDependencies;
private List<String> cmakeCommandList = new ArrayList<>();
......@@ -35,11 +35,11 @@ public class CMakeListsCPPViewModel extends ViewModelBase {
this.compName = compName;
}
public HashSet<CMakeFindModule> getModuleDependencies() {
public List<CMakeFindModule> getModuleDependencies() {
return moduleDependencies;
}
public void setModuleDependencies(HashSet<CMakeFindModule> moduleDependencies) {
public void setModuleDependencies(List<CMakeFindModule> moduleDependencies) {
this.moduleDependencies = moduleDependencies;
}
......
......@@ -389,19 +389,16 @@ public class GeneratorCPP implements Generator {
// add jni
cmake.addCMakeCommand("find_package(JNI)");
cmake.addCMakeCommand("set(INCLUDE_DIRS ${INCLUDE_DIRS} ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})");
// set install dir
cmake.addCMakeCommand("IF (WIN32)");
cmake.addCMakeCommand("set(CMAKE_INSTALL_PREFIX $ENV{DLL_DIR})");
cmake.addCMakeCommand("ELSE()");
cmake.addCMakeCommand("set(CMAKE_INSTALL_PREFIX /usr/lib)");
cmake.addCMakeCommand("ENDIF()");
// create shared lib
cmake.addCMakeCommandEnd("add_library(AutopilotAdapter SHARED AutopilotAdapter.cpp ${CMAKE_CURRENT_SOURCE_DIR})");
cmake.addCMakeCommandEnd("target_include_directories(AutopilotAdapter PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})");
cmake.addCMakeCommandEnd("target_link_libraries(AutopilotAdapter PUBLIC ${LIBS})");
cmake.addCMakeCommandEnd("set_target_properties(AutopilotAdapter PROPERTIES LINKER_LANGUAGE CXX)");
cmake.addCMakeCommand("IF (WIN32)");
cmake.addCMakeCommandEnd("set_target_properties(AutopilotAdapter PROPERTIES PREFIX \"\")");
cmake.addCMakeCommand("ENDIF()");
// install shared lib
cmake.addCMakeCommandEnd("install(TARGETS AutopilotAdapter DESTINATION \"./\")");
cmake.addCMakeCommandEnd("install(TARGETS AutopilotAdapter DESTINATION $ENV{DLL_DIR})");
cmake.addCMakeCommandEnd("export(TARGETS AutopilotAdapter FILE de_rwth_armin_modeling_autopilot_autopilotAdapter.cmake)");
}
......
......@@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH ${r"${CMAKE_MODULE_PATH}"} ${r"${CMAKE_CURRENT_SOURCE_DIR}
# add dependencies
<#list viewModel.moduleDependencies as var>
find_package(${var.packageName} <#if var.required>REQUIRED<#else>OPTIONAL</#if>)
find_package(${var.packageName} <#if var.required>REQUIRED<#else></#if>)
<#if var.findPath>set(INCLUDE_DIRS ${r"${INCLUDE_DIRS}"} ${r"${"}${var.packageName}${r"_INCLUDE_DIRS}"})</#if>
<#if var.findLibrary>set(LIBS ${r"${LIBS}"} ${r"${"}${var.packageName}${r"_LIBRARIES}"})</#if>
</#list>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment