aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-11-04 09:50:38 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit3eea3766761ec77281aaf113fd75d5ca8ab61341 (patch)
tree1d4573fbe5544600bbeb584fec70eac7b34da954 /src
parent6a2694048dc462449c2e07b53d610ffbface2254 (diff)
Fix cmake dependency failing build because of missing fPIC
Diffstat (limited to 'src')
-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)