diff options
-rw-r--r-- | hscript/CMakeLists.txt | 8 | ||||
-rw-r--r-- | hscript/meta.cc | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/hscript/CMakeLists.txt b/hscript/CMakeLists.txt index 60ca8a9..046b1ff 100644 --- a/hscript/CMakeLists.txt +++ b/hscript/CMakeLists.txt @@ -12,7 +12,13 @@ set(HSCRIPT_INCLUDE key.hh ) -add_library(hscript SHARED ${HSCRIPT_SOURCE}) +IF(INSTALL) +set(HSCRIPT_LIBRARY_TYPE SHARED) +ELSE(INSTALL) +set(HSCRIPT_LIBRARY_TYPE STATIC) +ENDIF(INSTALL) + +add_library(hscript ${HSCRIPT_LIBRARY_TYPE} ${HSCRIPT_SOURCE}) target_compile_features(hscript PRIVATE cxx_nullptr) target_compile_features(hscript PUBLIC cxx_unicode_literals) target_link_libraries(hscript ${BLKID_LIBRARIES}) diff --git a/hscript/meta.cc b/hscript/meta.cc index 02b294d..7e8cfe8 100644 --- a/hscript/meta.cc +++ b/hscript/meta.cc @@ -13,6 +13,7 @@ #include <assert.h> #include <fstream> #include <regex> +#include <sstream> #ifdef HAS_INSTALL_ENV # include <unistd.h> #endif /* HAS_INSTALL_ENV */ |