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