diff options
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index a15812300..b0b92396a 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -225,6 +225,9 @@ function _get_configs_for_generic(package, configs, opt) if shflags then table.insert(configs, "-DCMAKE_SHARED_LINKER_FLAGS=" .. shflags) end + if package:config("pic") ~= false then + table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON") + end end -- get configs for windows |
