From 6891017cbe07dc3d0826977a825022c45210dae9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 1 Sep 2018 20:37:05 -0400 Subject: [PATCH] Wait I thought I did PIC already wtf --- CMakeLists.txt | 11 ++++++----- README.md | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17c87683..c7193fbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,6 +205,9 @@ if(BUILD_SHARED_LIBS) SOVERSION "${_VERSION}") endif() endif() +# TODO why is this not a default?! +set_property(TARGET libui PROPERTY + POSITION_INDEPENDENT_CODE True) macro(_add_exec _name) # TODOTODO re-add WIN32 when merging back @@ -214,11 +217,9 @@ macro(_add_exec _name) target_link_libraries(${_name} libui) _target_link_options_private(${_name} _COMMON_LDFLAGS) - # make shared-linked executables PIC too - if(BUILD_SHARED_LIBS) - set_property(TARGET ${_name} PROPERTY - POSITION_INDEPENDENT_CODE True) - endif() + # TODO does this propagate? + set_property(TARGET ${_name} PROPERTY + POSITION_INDEPENDENT_CODE True) # TODO see above about INTERFACE if(NOT BUILD_SHARED_LIBS) target_link_libraries(${_name} diff --git a/README.md b/README.md index 189caa35..837e54f4 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ But libui is not dead; I am working on it whenever I can, and I hope to get it t * **1 September 2018** * **Alpha 4.1 is here.** This is an emergency fix to Alpha 4 to fix `uiImageAppend()` not working as documented. It now works properly, with one important difference you'll need to care about: **it now requires image data to be alpha-premultiplied**. In addition, `uiImage` also is implemented slightly more nicely now, and `ui.h` has minor documentation typo fixes. + * Alpha 4.1 also tries to make everything properly PIC-enabled. * **10 August 2018** * **Alpha 4 is finally here.** Everything from Alpha 3.5 and what's listed below is in this release; the two biggest changes are still the new text drawing API and new uiTable control. In between all that is a whole bunch of bugfixes, and hopefully more stability too. Thanks to everybody who helped contribute!