diff --git a/.dockerignore b/.dockerignore index b049286..396922b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,7 +5,7 @@ # ignore build folders bin build -cmakebuild +sconsbuild # ignore test files *.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 77deea2..38d3e21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,10 +3,14 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) project(forefire VERSION 1.0) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib) link_libraries("-lnetcdf_c++ -lnetcdf") file(GLOB_RECURSE SRC_FILES src/*.cpp) -add_executable(forefire ${SRC_FILES}) \ No newline at end of file +add_executable(forefire ${SRC_FILES}) + +add_library(forefireL SHARED ${SRC_FILES}) \ No newline at end of file diff --git a/Sconstruct b/Sconstruct index afc6a8e..ba3b9f6 100644 --- a/Sconstruct +++ b/Sconstruct @@ -15,7 +15,8 @@ if int(warnings): files = Glob('./sconsbuild/*.cpp') -env.Program('./bin/CommandShell', files, LIBS=['netcdf_c++', 'netcdf']) -env.SharedLibrary('./lib/ForeFire', files, LIBS=['netcdf_c++', 'netcdf']) +env.Program('./sconsbuild/bin/CommandShell', files, LIBS=['netcdf_c++', 'netcdf']) + +env.SharedLibrary('./sconsbuild/lib/ForeFire', files, LIBS=['netcdf_c++', 'netcdf'])