Skip to content

Commit

Permalink
Install cppruntime libraries in the correct directory
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25851 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 30, 2015
1 parent 998faeb commit 799136a
Show file tree
Hide file tree
Showing 22 changed files with 46 additions and 45 deletions.
10 changes: 5 additions & 5 deletions SimulationRuntime/cpp/CMakeLists.txt
Expand Up @@ -45,7 +45,7 @@ OPTION(SUNDIALS_ROOT "SUNDIALS ROOT" "")
SET(MODELICAEXTERNALCDIR "${CMAKE_SOURCE_DIR}/../../libraries/Resources/C-Sources")
SET(USERTABDIR "${CMAKE_SOURCE_DIR}/../../libraries/Resources/Data/Tables")

SET(LIBINSTALLEXT "cpp")
SET(LIBINSTALLEXT "lib/omc/cpp" CACHE STRING "library directory")
SET(MODELICA_MODEL "ModelicaSystem")
SET(LIBPREFIX "OMCpp")
SET(SolverName ${LIBPREFIX}Solver)
Expand Down Expand Up @@ -304,23 +304,23 @@ IF(USE_SUNDIALS)

FIND_LIBRARY(SUNDIALS_NVECSERIAL_LIB "sundials_nvecserial" PATHS ${SUNDIALS_LIBRARY_RELEASE_HOME} $ENV{SUNDIALS_ROOT}/lib)
IF(NOT SUNDIALS_NVECSERIAL_LIB)
MESSAGE(FATAL_ERROR "Could not find libsundials_nvecserial!")
MESSAGE(FATAL_ERROR "Could not find libsundials_nvecserial!")
ENDIF()
GET_FILENAME_COMPONENT(SUNDIALS_LIBS "${SUNDIALS_NVECSERIAL_LIB}" PATH)

FIND_LIBRARY(SUNDIALS_CVODES_LIB "sundials_cvodes" PATHS ${SUNDIALS_LIBRARY_RELEASE_HOME} $ENV{SUNDIALS_ROOT}/lib)
IF(NOT SUNDIALS_CVODES_LIB)
MESSAGE(FATAL_ERROR "Could not find libsundials_cvodes!")
MESSAGE(FATAL_ERROR "Could not find libsundials_cvodes!")
ENDIF()

FIND_LIBRARY(SUNDIALS_IDA_LIB "sundials_idas" PATHS ${SUNDIALS_LIBRARY_RELEASE_HOME} $ENV{SUNDIALS_ROOT}/lib)
IF(NOT SUNDIALS_IDA_LIB)
MESSAGE(FATAL_ERROR "Could not find libsundials_ida!")
MESSAGE(FATAL_ERROR "Could not find libsundials_ida!")
ENDIF()

FIND_LIBRARY(SUNDIALS_KINSOL_LIB "sundials_kinsol" PATHS ${SUNDIALS_LIBRARY_RELEASE_HOME} $ENV{SUNDIALS_ROOT}/lib)
IF(NOT SUNDIALS_KINSOL_LIB)
MESSAGE(FATAL_ERROR "Could not find libsundials_kinsol!")
MESSAGE(FATAL_ERROR "Could not find libsundials_kinsol!")
ENDIF()
SET(SUNDIALS_LIBRARIES ${SUNDIALS_NVECSERIAL_LIB} ${SUNDIALS_CVODES_LIB} ${SUNDIALS_IDA_LIB} ${SUNDIALS_KINSOL_LIB})

Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/DataExchange/CMakeLists.txt
Expand Up @@ -24,8 +24,8 @@ if (UNIX)
set_target_properties(${DataExchangeName}_static PROPERTIES COMPILE_FLAGS -fPIC)
endif(UNIX)

install (TARGETS ${DataExchangeName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${DataExchangeName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${DataExchangeName} DESTINATION ${LIBINSTALLEXT})
install (TARGETS ${DataExchangeName}_static DESTINATION ${LIBINSTALLEXT})

install (FILES ${CMAKE_SOURCE_DIR}/Include/Core/DataExchange/IHistory.h
${CMAKE_SOURCE_DIR}/Include/Core/DataExchange/ISimVar.h
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/Math/CMakeLists.txt
Expand Up @@ -7,7 +7,7 @@ add_library(${MathName}_static STATIC ArrayOperations.cpp Functions.cpp Factory
IF(UNIX)
set_target_properties(${MathName}_static PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF(UNIX)
install (TARGETS ${MathName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${MathName}_static DESTINATION ${LIBINSTALLEXT})

IF(RUNTIME_STATIC_LINKING)
ELSE(RUNTIME_STATIC_LINKING)
Expand All @@ -16,7 +16,7 @@ ELSE(RUNTIME_STATIC_LINKING)
IF(UNIX)
set_target_properties(${MathName} PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF(UNIX)
install (TARGETS ${MathName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${MathName} DESTINATION ${LIBINSTALLEXT})
add_precompiled_header(${MathName} Include/Core/Modelica.h )
ENDIF(RUNTIME_STATIC_LINKING)

Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/ModelicaExternalC/CMakeLists.txt
Expand Up @@ -9,6 +9,6 @@ if (UNIX)
set_target_properties(${ModelicaExternalName} PROPERTIES COMPILE_FLAGS -fPIC)
set_target_properties(${ModelicaTablesName} PROPERTIES COMPILE_FLAGS -fPIC)
endif(UNIX)
install (TARGETS ${ModelicaExternalName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${ModelicaTablesName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${ModelicaExternalName} DESTINATION ${LIBINSTALLEXT})
install (TARGETS ${ModelicaTablesName} DESTINATION ${LIBINSTALLEXT})
#lib/omc/cpp
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/SimController/CMakeLists.txt
Expand Up @@ -5,12 +5,12 @@ project(${SimControllerName})
IF(RUNTIME_STATIC_LINKING)
include_directories(${SUNDIALS_INCLUDE_DIR}/cvodes ${SUNDIALS_INCLUDE_DIR}/nvector ${SUNDIALS_INCLUDE_DIR}/sundials ${SUNDIALS_INCLUDE_DIR}/kinsol ${SUNDIALS_INCLUDE_DIR})
add_library(${SimControllerName}_static STATIC Configuration.cpp FactoryExport.cpp Initialization.cpp SimController.cpp SimManager.cpp)
install (TARGETS ${SimControllerName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SimControllerName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${SimControllerName} SHARED Configuration.cpp FactoryExport.cpp Initialization.cpp SimController.cpp SimManager.cpp)
target_link_libraries( ${SimControllerName} ${OMCFactoryName} ${ExtensionUtilitiesName} ${ModelicaUtilitiesName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} )
add_precompiled_header(${SimControllerName} Include/Core/Modelica.h )
install (TARGETS ${SimControllerName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SimControllerName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)


Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/SimulationSettings/CMakeLists.txt
Expand Up @@ -5,12 +5,12 @@ project(${SimulationSettings})
IF(RUNTIME_STATIC_LINKING)
include_directories(${SUNDIALS_INCLUDE_DIR}/cvodes ${SUNDIALS_INCLUDE_DIR}/nvector ${SUNDIALS_INCLUDE_DIR}/sundials ${SUNDIALS_INCLUDE_DIR})
add_library(${SimulationSettings}_static STATIC GlobalSettings.cpp Factory.cpp FactoryExport.cpp)
install (TARGETS ${SimulationSettings}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SimulationSettings}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${SimulationSettings} SHARED GlobalSettings.cpp Factory.cpp FactoryExport.cpp)
target_link_libraries( ${SimulationSettings} ${OMCFactoryName} ${Boost_LIBRARIES})
add_precompiled_header(${SimulationSettings} Include/Core/Modelica.h )
install (TARGETS ${SimulationSettings} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SimulationSettings} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)

install (FILES "config/GlobalSettings.xml"
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/Solver/CMakeLists.txt
Expand Up @@ -6,12 +6,12 @@ project(${SolverName})
IF(RUNTIME_STATIC_LINKING)
include_directories(${SUNDIALS_INCLUDE_DIR}/cvodes ${SUNDIALS_INCLUDE_DIR}/nvector ${SUNDIALS_INCLUDE_DIR}/sundials ${SUNDIALS_INCLUDE_DIR})
add_library(${SolverName}_static STATIC SolverDefaultImplementation.cpp SolverSettings.cpp SystemStateSelection.cpp FactoryExport.cpp SimulationMonitor.cpp )
install (TARGETS ${SolverName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SolverName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${SolverName} SHARED SolverDefaultImplementation.cpp SolverSettings.cpp SystemStateSelection.cpp FactoryExport.cpp SimulationMonitor.cpp )
target_link_libraries (${SolverName} ${MathName} ${Boost_LIBRARIES} ${ExtensionUtilitiesName})
add_precompiled_header(${SolverName} Include/Core/Modelica.h )
install (TARGETS ${SolverName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SolverName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)

install (FILES
Expand Down
8 changes: 4 additions & 4 deletions SimulationRuntime/cpp/Core/System/CMakeLists.txt
Expand Up @@ -18,7 +18,7 @@ include_directories(${SUNDIALS_INCLUDE_DIR}/cvodes ${SUNDIALS_INCLUDE_DIR}/nvect
if (UNIX)
set_target_properties(${SystemName}_FMU PROPERTIES COMPILE_FLAGS -fPIC)
endif(UNIX)
install (TARGETS ${SystemName}_FMU DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SystemName}_FMU DESTINATION ${LIBINSTALLEXT})

IF(RUNTIME_STATIC_LINKING)
add_library(${SystemName}_static STATIC AlgLoopDefaultImplementation.cpp AlgLoopSolverFactory.cpp EventHandling.cpp DiscreteEvents.cpp ContinuousEvents.cpp SystemDefaultImplementation.cpp SimVars.cpp FactoryExport.cpp)
Expand All @@ -27,16 +27,16 @@ IF(RUNTIME_STATIC_LINKING)
if (UNIX)
set_target_properties(${SystemName}_static PROPERTIES COMPILE_FLAGS -fPIC)
endif(UNIX)
install (TARGETS ${SystemName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SystemName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${SystemName} SHARED AlgLoopDefaultImplementation.cpp AlgLoopSolverFactory.cpp EventHandling.cpp DiscreteEvents.cpp ContinuousEvents.cpp SystemDefaultImplementation.cpp SimVars.cpp FactoryExport.cpp)
target_link_libraries (${SystemName} ${Boost_LIBRARIES} ${LAPACK_LIBRARIES} ${OMCFactoryName} )
add_precompiled_header(${SystemName} Include/Core/Modelica.h )
install (TARGETS ${SystemName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${SystemName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)

#IF (NOT ((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") OR MSVC))
#install (TARGETS ${BasiLibName} DESTINATION lib/omc/${LIBINSTALLEXT})
#install (TARGETS ${BasiLibName} DESTINATION ${LIBINSTALLEXT})
#ENDIF (NOT ((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") OR MSVC))
install (FILES
${CMAKE_SOURCE_DIR}/Include/Core/System/SystemDefaultImplementation.h
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Core/Utils/Modelica/CMakeLists.txt
Expand Up @@ -14,6 +14,6 @@ if (UNIX)
set_target_properties(${ModelicaUtilitiesName} PROPERTIES COMPILE_FLAGS -fPIC)
endif(UNIX)
target_link_libraries (${ModelicaUtilitiesName} ${Boost_LIBRARIES})
install (TARGETS ${ModelicaUtilitiesName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${ModelicaUtilitiesName} DESTINATION ${LIBINSTALLEXT})

install (FILES ${CMAKE_SOURCE_DIR}/Include/Core/Utils/Modelica/ModelicaUtilities.h ${CMAKE_SOURCE_DIR}/Include/Core/Utils/Modelica/FactoryExport.h ${CMAKE_SOURCE_DIR}/Include/Core/Utils/Modelica/ModelicaSimulationError.h DESTINATION include/omc/cpp/Core/Utils/Modelica)
6 changes: 3 additions & 3 deletions SimulationRuntime/cpp/Core/Utils/extension/CMakeLists.txt
Expand Up @@ -10,7 +10,7 @@ IF(RUNTIME_STATIC_LINKING)
set_target_properties(${ExtensionUtilitiesName}_static PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF(UNIX)

install (TARGETS ${ExtensionUtilitiesName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${ExtensionUtilitiesName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${ExtensionUtilitiesName} SHARED measure_time.cpp measure_time_rdtsc.cpp measure_time_scorep.cpp)
IF(NOT BOOST_STATIC_LINKING)
Expand All @@ -20,7 +20,7 @@ ELSE(RUNTIME_STATIC_LINKING)
set_target_properties(${ExtensionUtilitiesName} PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF(UNIX)

install (TARGETS ${ExtensionUtilitiesName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${ExtensionUtilitiesName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)


Expand All @@ -37,7 +37,7 @@ IF(PAPI_FOUND)
target_link_libraries ("${ExtensionUtilitiesName}_papi" ${Boost_LIBRARIES})
ENDIF(NOT BOOST_STATIC_LINKING)

install (TARGETS "${ExtensionUtilitiesName}_papi" DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS "${ExtensionUtilitiesName}_papi" DESTINATION ${LIBINSTALLEXT})

install (FILES ${CMAKE_SOURCE_DIR}/Include/Core/Utils/extension/measure_time_papi.hpp
DESTINATION include/omc/cpp/Core/Utils/extension)
Expand Down
Expand Up @@ -43,8 +43,8 @@ endif
ifneq ("$(USE_SUNDIALS_LAPACK)","true")
$(eval SUNDIALS_LAPACK_COMMAND=)
endif
cd ./Build && echo "change to Build" && $(CMAKE_COMMANDS) cmake $(RUNTIME_STATIC_LINKING_COMMAND) $(BOOST_STATIC_LINKING_COMMAND) $(BOOST_REALPATHS_COMMAND) $(PARALLEL_OUTPUT_COMMAND) $(RUNTIME_PROFILING_COMMAND) $(SCOREP_COMMAND) $(SUNDIALS_LAPACK_COMMAND) -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH="$(builddir_build)" $(CMAKE_ARGS) ../
$(MAKE) -C Build VERBOSE=1
cd ./Build && echo "change to Build" && $(CMAKE_COMMANDS) cmake $(RUNTIME_STATIC_LINKING_COMMAND) $(BOOST_STATIC_LINKING_COMMAND) $(BOOST_REALPATHS_COMMAND) $(PARALLEL_OUTPUT_COMMAND) $(RUNTIME_PROFILING_COMMAND) $(SCOREP_COMMAND) $(SUNDIALS_LAPACK_COMMAND) -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH="$(builddir_build)" -DLIBINSTALLEXT=lib/@host_short@/omc/cpp $(CMAKE_ARGS) ../
$(MAKE) -C Build VERBOSE=1

install: runtimeCpp
(cd Build; $(MAKE) install)
Expand Down
Expand Up @@ -6,9 +6,9 @@ IF(RUNTIME_STATIC_LINKING)
message(STATUS "Building OMCFactory in analyzation mode")
# add the system default implementation library
add_library(${OMCFactoryName}_static STATIC OMCFactory.cpp StaticOMCFactory.cpp)
#LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/../../../../build/lib/omc/${LIBINSTALLEXT})
#LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/../../../../build/${LIBINSTALLEXT})
include_directories(${SUNDIALS_INCLUDE_DIR}/cvodes ${SUNDIALS_INCLUDE_DIR}/nvector ${SUNDIALS_INCLUDE_DIR}/sundials ${SUNDIALS_INCLUDE_DIR}/kinsol ${SUNDIALS_INCLUDE_DIR})
install (TARGETS ${OMCFactoryName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${OMCFactoryName}_static DESTINATION ${LIBINSTALLEXT})
if (UNIX)
set_target_properties(${OMCFactoryName}_static PROPERTIES COMPILE_FLAGS -fPIC)
endif(UNIX)
Expand All @@ -17,7 +17,7 @@ ELSE(RUNTIME_STATIC_LINKING)
# add the system default implementation library
add_library(${OMCFactoryName} STATIC OMCFactory.cpp)
target_link_libraries( ${OMCFactoryName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS})
install (TARGETS ${OMCFactoryName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${OMCFactoryName} DESTINATION ${LIBINSTALLEXT})
if (UNIX)
set_target_properties(${OMCFactoryName} PROPERTIES COMPILE_FLAGS -fPIC)
endif(UNIX)
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/CVode/CMakeLists.txt
Expand Up @@ -6,12 +6,12 @@ include_directories(${SUNDIALS_INCLUDE_DIR}/cvodes ${SUNDIALS_INCLUDE_DIR}/nvect
# add the solver default implementation library
IF(RUNTIME_STATIC_LINKING)
add_library(${CVodeName}_static STATIC CVode.cpp CVodeSettings.cpp FactoryExport.cpp)
install (TARGETS ${CVodeName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${CVodeName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${CVodeName} SHARED CVode.cpp CVodeSettings.cpp FactoryExport.cpp )
target_link_libraries (${CVodeName} ${SolverName} ${ExtensionUtilitiesName} ${Boost_LIBRARIES} ${SUNDIALS_LIBRARIES})
add_precompiled_header(${CVodeName} Include/Core/Modelica.h )
install (TARGETS ${CVodeName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${CVodeName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)
#target_link_libraries( Euler ${Boost_serialization_LIBRARY})

Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Solver/Euler/CMakeLists.txt
Expand Up @@ -16,7 +16,7 @@ target_link_libraries (${EulerName} ${SolverName} ${Boost_LIBRARIES} ${LAPACK_LI



install (TARGETS ${EulerName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${EulerName} DESTINATION ${LIBINSTALLEXT})
install (FILES "config/EulerSettings.xml"
DESTINATION share/omc/runtime/cpp/config)

Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Solver/Hybrj/CMakeLists.txt
Expand Up @@ -13,7 +13,7 @@ target_link_libraries( ${HybrjName} ${Boost_LIBRARIES})
target_link_libraries( ${HybrjName} ${LAPACK_LIBRARIES} ${CMINPACK_LIBRARY})
message(STATUS ${CMINPACK_LIBRARY})

install (TARGETS ${HybrjName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${HybrjName} DESTINATION ${LIBINSTALLEXT})
#install (FILES "../Interfaces/NewtonSettings.xml"
# DESTINATION bin/config)

Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/IDA/CMakeLists.txt
Expand Up @@ -6,12 +6,12 @@ include_directories(${SUNDIALS_INCLUDE_DIR}/ida ${SUNDIALS_INCLUDE_DIR}/nvector
# add the solver default implementation library
IF(RUNTIME_STATIC_LINKING)
add_library(${IDAName}_static STATIC IDA.cpp IDASettings.cpp FactoryExport.cpp)
install (TARGETS ${IDAName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${IDAName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${IDAName} SHARED IDA.cpp IDASettings.cpp FactoryExport.cpp)
target_link_libraries (${IDAName} ${SolverName} ${ExtensionUtilitiesName} ${Boost_LIBRARIES} ${SUNDIALS_LIBRARIES})
add_precompiled_header(${IDAName} Include/Core/Modelica.h )
install (TARGETS ${IDAName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${IDAName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)

IF(RUNTIME_STATIC_LINKING)
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/Kinsol/CMakeLists.txt
Expand Up @@ -6,10 +6,10 @@ include_directories(${SUNDIALS_INCLUDE_DIR}/kinsol ${SUNDIALS_INCLUDE_DIR}/nvect
IF(RUNTIME_STATIC_LINKING)
add_library(${KinsolName}_static STATIC Kinsol.cpp KinsolSettings.cpp FactoryExport.cpp)
include_directories(${SUNDIALS_INCLUDE_DIR}/cvodes ${SUNDIALS_INCLUDE_DIR}/nvector ${SUNDIALS_INCLUDE_DIR}/sundials ${SUNDIALS_INCLUDE_DIR})
install (TARGETS ${KinsolName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${KinsolName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${KinsolName} SHARED Kinsol.cpp KinsolSettings.cpp FactoryExport.cpp)
install (TARGETS ${KinsolName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${KinsolName} DESTINATION ${LIBINSTALLEXT})
add_precompiled_header(${KinsolName} Include/Core/Modelica.h )
target_link_libraries(${KinsolName} ${Boost_LIBRARIES} ${SUNDIALS_LIBRARIES} ${LAPACK_LIBRARIES})
ENDIF(RUNTIME_STATIC_LINKING)
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/Newton/CMakeLists.txt
Expand Up @@ -7,12 +7,12 @@ project(${NewtonName})
IF(RUNTIME_STATIC_LINKING)
include_directories(${SUNDIALS_INCLUDE_DIR}/cvodes ${SUNDIALS_INCLUDE_DIR}/nvector ${SUNDIALS_INCLUDE_DIR}/sundials ${SUNDIALS_INCLUDE_DIR})
add_library(${NewtonName}_static STATIC Newton.cpp NewtonSettings.cpp FactoryExport )
install (TARGETS ${NewtonName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${NewtonName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${NewtonName} SHARED Newton.cpp NewtonSettings.cpp FactoryExport )
target_link_libraries( ${NewtonName} ${Boost_LIBRARIES} ${LAPACK_LIBRARIES})
add_precompiled_header(${NewtonName} Include/Core/Modelica.h )
install (TARGETS ${NewtonName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${NewtonName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)

#install (FILES "../Interfaces/NewtonSettings.xml"
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/Peer/CMakeLists.txt
Expand Up @@ -5,12 +5,12 @@ project(${PeerName})
# add the solver default implementation library
IF(RUNTIME_STATIC_LINKING)
add_library(${PeerName}_static STATIC Peer.cpp PeerSettings.cpp FactoryExport.cpp )
install (TARGETS ${PeerName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${PeerName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${PeerName} SHARED Peer.cpp PeerSettings.cpp FactoryExport.cpp )
target_link_libraries (${PeerName} ${SolverName} ${ExtensionUtilitiesName} ${Boost_LIBRARIES})
add_precompiled_header(${PeerName} Include/Core/Modelica.h )
install (TARGETS ${PeerName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${PeerName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)

IF(RUNTIME_STATIC_LINKING)
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Solver/RTEuler/CMakeLists.txt
Expand Up @@ -10,7 +10,7 @@ ELSE(RUNTIME_STATIC_LINKING)

ENDIF(RUNTIME_STATIC_LINKING)
target_link_libraries (${RTEulerName} ${SolverName} ${Boost_LIBRARIES} ${LAPACK_LIBRARIES} )
install (TARGETS ${RTEulerName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${RTEulerName} DESTINATION ${LIBINSTALLEXT})



Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/UmfPack/CMakeLists.txt
Expand Up @@ -8,12 +8,12 @@ project(${UmfPackName})
IF(RUNTIME_STATIC_LINKING)
message(STATUS "Building UmfPack for analyzation")
add_library(${UmfPackName}_static STATIC UmfPack.cpp UmfPackSettings.cpp FactoryExport )
install (TARGETS ${UmfPackName}_static DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${UmfPackName}_static DESTINATION ${LIBINSTALLEXT})
ELSE(RUNTIME_STATIC_LINKING)
add_library(${UmfPackName} SHARED UmfPack.cpp UmfPackSettings.cpp FactoryExport)
target_link_libraries( ${UmfPackName} ${MathName} ${SUITESPARSE_LIBRARIES} ${Boost_LIBRARIES} ${LAPACK_LIBRARIES} ${UMFPACK_LIB})

install (TARGETS ${UmfPackName} DESTINATION lib/omc/${LIBINSTALLEXT})
install (TARGETS ${UmfPackName} DESTINATION ${LIBINSTALLEXT})
ENDIF(RUNTIME_STATIC_LINKING)

IF(RUNTIME_STATIC_LINKING)
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -913,6 +913,7 @@ OMOptimBasis/build/Makefile.unix \
OMOptimBasis/build/OMOptimBasis.config \
OMVisualize/OMVisualizeGUI/OMVisualizeGUI.config \
SimulationRuntime/c/Makefile \
SimulationRuntime/cpp/Makefile \
SimulationRuntime/ParModelica/Makefile \
SimulationRuntime/ParModelica/auto/Makefile \
SimulationRuntime/ParModelica/explicit/openclrt/Makefile \
Expand Down

0 comments on commit 799136a

Please sign in to comment.