|
|
On 3/17/24 19:24 Rob McDonald wrote:
That's probably due to some "old code" leaking into the
"Modern CMake" approach. I didn't have the time yet to
rewrite everything and I'm aware that there's still
something to do.
I figured this would be the root cause.
Very likely, I see pretty much chaos and inconsistent code in this
area. :-(
I started working on this but it will take some time - definitely
not today.
In the short term, I'm going to attempt something
like
get_target_property(templist
fltk:fltk INTERFACE_LINK_LIBRARIES)
list(REMOVE_ITEM templist "-no-pie")
set_target_properties(fltk:fltk PROPERTIES
INTERFACE_LINK_LIBRARIES ${templist})
Or something like that.
Might work but it's only a workaround.
Exactly.
For now I have a short request to test: can you please comment out
(or delete) the 3 lines of code in src/CMakeLists.txt that set the
'-no-pie' flag in the FLTK code and try again w/o the assignment?
767 if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND NOT FLTK_BUILD_SHARED_LIBS)
768 list(APPEND OPTIONAL_LIBS "-no-pie")
769 endif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND NOT FLTK_BUILD_SHARED_LIBS)
I believe that we can remove that '-no-pie' entirely but I'm still
investigating why it was introduced in the first place. The
condition used for the assignment (... AND NOT
FLTK_BUILD_SHARED_LIBS) is wrong anyway in this context.
Alternatively (or additionally) you could try changing the two lines
that assign OPTIONAL_LIBS as PUBLIC to PRIVATE:
775 target_link_libraries(fltk PUBLIC ${OPTIONAL_LIBS})
831 target_link_libraries(fltk-shared PUBLIC ${OPTIONAL_LIBS})
s/PUBLIC/PRIVATE/
There's another line (907) for MSVC that shouldn't matter for now,
you can leave that one as-is.
I tried all this myself and didn't find any drawbacks but I'm still
working on a more complete solution.
I'd appreciate if you could test and report back, but there's no
need to hurry. I won't be able to work on it today, I need some
sleep. If you could do it in your TZ's "today" so I could find it
here tomorrow that would be great. TIA
PS: I'm also investigating an option like "DISABLE_GLU" to solve
your other issue but I'll reply to the other thread tomorrow.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/168f23aa-639c-43a3-b7a0-4a90a3ca056d%40aljus.de.
[ Direct Link to Message ] | |
|
| |