aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CmakeModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp
index bffd532..c1f7643 100644
--- a/src/CmakeModule.cpp
+++ b/src/CmakeModule.cpp
@@ -3,6 +3,7 @@
#include "../include/GlobalLib.hpp"
#include "../include/PkgConfig.hpp"
#include "../backend/BackendUtils.hpp"
+#include <stdlib.h>
#if OS_FAMILY == OS_FAMILY_POSIX
#define nprintf printf
@@ -137,6 +138,8 @@ namespace sibs
if (createBuildDirResult.isErr())
return createBuildDirResult;
+ setenv("CFLAGS", "-fPIC", 1);
+ setenv("CXXFLAGS", "-fPIC", 1);
FileString cmd = cmakePath;
cmd += TINYDIR_STRING(" ");
if(config.getCompiler() == Compiler::GCC)