Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/LibraryHelper.cmake
- This file was added.
# Facilities to manage libraries | |||||
macro(build_shared FROM_TARGET TO_TARGET) | |||||
deadalnix: This is the exact reverse as what cmake libraries typically do. | |||||
set_target_properties(${FROM_TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON) | |||||
deadalnixUnsubmitted Not Done Inline ActionsWhy is that necessary ? Also, this doesn't seem to be a generally useful function as properties aren't applied transitively. I'd be surprised if cmake was unable to figure out it need to build PIC code for SHARED lib dependencies. deadalnix: Why is that necessary ? Also, this doesn't seem to be a generally useful function as properties… | |||||
FabienAuthorUnsubmitted Done Inline ActionsThe shared library will be built with PIC as cmake will add it automatically because of being shared, but it does not apply to the dependencies. Fabien: The shared library will be built with PIC as cmake will add it automatically because of being… | |||||
add_library(${TO_TARGET} SHARED $<TARGET_PROPERTY:${FROM_TARGET},SOURCES>) | |||||
endmacro() |
This is the exact reverse as what cmake libraries typically do.