cba7a4d20e
Object libraries are weird, and producing a library by using the target objects from them doesn't automatically import the interface properties of the linked targets. These object libraries only have single uses, so just directly create the final library from the sources. Leaves libelf as an object library, since there seems to be some cmake oddity when trying to link an unexported target to an exported one. Change-Id: Ic379612c89340c40085c9862cfe111fa4bbff425
20 строки
497 B
CMake
20 строки
497 B
CMake
|
|
file(GLOB sources
|
|
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/*.c
|
|
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
|
)
|
|
|
|
add_library(oclelf_obj OBJECT ${sources})
|
|
set_target_properties(oclelf_obj PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
|
|
target_include_directories(oclelf_obj
|
|
PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/win32/sys)
|
|
|
|
target_compile_definitions(oclelf_obj
|
|
PUBLIC
|
|
BSD_LIBELF USE_MEMFILE)
|