Commit 208cc06d authored by legoc's avatar legoc
Browse files

Added cmake for gnuplot and boost libraries

parent f410ea77
......@@ -11,11 +11,11 @@ include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(FetchContent)
if(NOT DEFINED BUILD_SHARED_LIBS)
if (NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Building dynamic (ON) or static (OFF)" ON)
endif()
if(NOT DEFINED CMAKE_CXX_STANDARD)
if (NOT DEFINED CMAKE_CXX_STANDARD)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
......@@ -24,17 +24,21 @@ endif()
option(NOMAD "Compile Nomad library and programs" OFF)
option(CAMEO "Compile Cameo programs" OFF)
option(GNUPLOT "Compile Gnuplot programs" OFF)
# Add current directory for find package
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
if(CAMEO)
if (CAMEO)
# Set the variables Cameo_FOUND, Cameo_INCLUDE_DIRS, Cameo_LIBRARIES
find_package(Cameo REQUIRED)
endif(CAMEO)
message("Cameo found " ${Cameo_FOUND})
message("Cameo include " ${Cameo_INCLUDE_DIRS})
message("Cameo lib " ${Cameo_LIBRARIES})
if (GNUPLOT)
find_package(Boost 1.67.0 COMPONENTS iostreams filesystem system)
endif(GNUPLOT)
#------------------------------------------------------------
# Libraries
......
if(NOMAD)
if (NOMAD)
add_subdirectory(nomad)
endif(NOMAD)
\ No newline at end of file
add_subdirectory(common)
if(NOMAD)
if (NOMAD)
add_subdirectory(nomad)
endif(NOMAD)
if(CAMEO)
if (CAMEO)
add_subdirectory(cameo)
endif(CAMEO)
\ No newline at end of file
endif(CAMEO)
if (GNUPLOT)
add_subdirectory(gnuplot)
endif(GNUPLOT)
include_directories(${Boost_INCLUDE_DIRS})
#------------------------------------------------------------
# Programs
#------------------------------------------------------------
add_executable(lstplot128
gnuplot-iostream.h
Plot.cpp
)
target_link_libraries(lstplot128 PUBLIC
lstdpp128 ${Boost_LIBRARIES}
)
#------------------------------------------------------------
# Install
#------------------------------------------------------------
install(
TARGETS lstplot128
DESTINATION bin
)
\ No newline at end of file
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