Commit 2def4e3f authored by pkda001's avatar pkda001

modified README and cmake file to reflect new organization

parent 323d99f2
......@@ -30,7 +30,7 @@ To install <a href="https://gitlab.kitware.com/physiology/engine">Pulse reposito
# enter builds folder
$ cd builds
# connect Pulse and CLASim for CMake Install
$ cmake .. -DCMAKE_PREFIX_PATH= <PathToPulse>/builds/install/
$ cmake .. -DCMAKE_PREFIX_PATH=<PathToPulse>/builds/install/
# create CLASim add_executable
$ make
$ make Install
......
......@@ -2,45 +2,46 @@ cmake_minimum_required(VERSION 3.9.4)
project(clasim)
# use dpkg -L libconfig++-dev to find the location of libconfig.h++ and libconfig++.a
find_path(CONFIG++_INCLUDE_DIR libconfig.h++ <libconfig.h++ location>)
find_library(CONFIG++_LIBRARY NAMES libconfig++.a PATH <libconfig++.a location>)
find_path(CONFIG++_INCLUDE_DIR libconfig.h++)
find_library(CONFIG++_LIBRARY NAMES libconfig++.a)
# set your simulation source directory
set(SIM_SRC_PATH simsrc/mcps2018/algo2)
set(SIM_SRC_DIR simsrc/mcps2018/algo1)
# *** include your source files
# list each file individually
set(MY_SOURCE_FILES
${SIM_SRC_PATH}/SimEngine.cpp
${SIM_SRC_PATH}/Monitor.cpp
${SIM_SRC_PATH}/Controller.cpp
${SIM_SRC_PATH}/Pump.cpp
${SIM_SRC_PATH}/SimulationLogger.cpp
${SIM_SRC_PATH}/MedicalDevice.cpp
${SIM_SRC_DIR}/SimEngine.cpp
${SIM_SRC_DIR}/Monitor.cpp
${SIM_SRC_DIR}/Controller.cpp
${SIM_SRC_DIR}/Pump.cpp
${SIM_SRC_DIR}/SimulationLogger.cpp
${SIM_SRC_DIR}/MedicalDevice.cpp
)
add_executable(clasim ${MY_SOURCE_FILES})
# set name of application created to run simulation
set(APPNAME clasim)
#clasim depends on pulse this will call will give you access to pulse directories
#needed by clasim
add_executable(${APPNAME} ${MY_SOURCE_FILES})
#cmd depends on pulse this will call will give you access to pulse directories
#needed by cmd
find_package(Pulse REQUIRED NO_MODULE)
#include directories
target_include_directories(clasim PRIVATE ${Pulse_INCLUDE_DIRS})
target_include_directories(clasim PRIVATE ${CONFIG++_INCLUDE_DIR})
target_include_directories(${APPNAME} PRIVATE ${Pulse_INCLUDE_DIRS})
target_include_directories(${APPNAME} PRIVATE ${CONFIG++_INCLUDE_DIR})
# *** include your simulation include directories here
target_include_directories(clasim PRIVATE simsrc/mcps2018/include/)
target_include_directories(${APPNAME} PRIVATE simsrc/mcps2018/include/)
#libraries
target_link_libraries(clasim debug "${Pulse_DEBUG_LIBS}")
target_link_libraries(clasim optimized "${Pulse_LIBS}")
target_link_libraries(clasim optimized "${CONFIG++_LIBRARY}")
target_link_libraries(${APPNAME} debug "${Pulse_DEBUG_LIBS}")
target_link_libraries(${APPNAME} optimized "${Pulse_LIBS}")
target_link_libraries(${APPNAME} optimized "${CONFIG++_LIBRARY}")
install(TARGETS clasim RUNTIME DESTINATION ${Pulse_INSTALL}/bin)
install(TARGETS ${APPNAME} RUNTIME DESTINATION ${Pulse_INSTALL}/bin)
Markdown is supported
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