aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CmakeModule.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp
index c1f7643..394acdb 100644
--- a/src/CmakeModule.cpp
+++ b/src/CmakeModule.cpp
@@ -138,8 +138,13 @@ namespace sibs
if (createBuildDirResult.isErr())
return createBuildDirResult;
+#if OS_FAMILY == OS_FAMILY_POSIX
setenv("CFLAGS", "-fPIC", 1);
setenv("CXXFLAGS", "-fPIC", 1);
+#else
+ _putenv("CFLAGS=-fPIC");
+ _putenv("CXXFLAGS=-fPIC");
+#endif
FileString cmd = cmakePath;
cmd += TINYDIR_STRING(" ");
if(config.getCompiler() == Compiler::GCC)
@@ -220,7 +225,7 @@ namespace sibs
if(config.getPackageType() != PackageType::EXECUTABLE)
{
- const _tinydir_char_t *dynamicLibExtension = TINYDIR_STRING(CONFIG_DYNAMIC_LIB_FILE_EXTENSION);
+ const _tinydir_char_t *dynamicLibExtension = CONFIG_DYNAMIC_LIB_FILE_EXTENSION;
if(config.getCompiler() == Compiler::MINGW_W64)
dynamicLibExtension = TINYDIR_STRING("dll");