File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.0 )
22
3+ # required to be able to link libraries into shared libraries or PIEs
4+ set (CMAKE_POSITION_INDEPENDENT_CODE ON )
5+
36file (GLOB HEADERS ${PROJECT_SOURCE_DIR} /include/linuxdeploy/desktopfile/*.h )
47
5- add_library (linuxdeploy_desktopfile STATIC
8+ add_library (_linuxdeploy_desktopfile_objs OBJECT
69 desktopfile.cpp
710 desktopfileentry.cpp
811 desktopfilereader.cpp
@@ -13,4 +16,11 @@ add_library(linuxdeploy_desktopfile STATIC
1316 ${HEADERS}
1417)
1518
16- target_include_directories (linuxdeploy_desktopfile PUBLIC ${PROJECT_SOURCE_DIR} /include )
19+ add_library (linuxdeploy_desktopfile SHARED $<TARGET_OBJECTS :_linuxdeploy_desktopfile_objs >)
20+
21+ add_library (linuxdeploy_desktopfile_static STATIC $<TARGET_OBJECTS :_linuxdeploy_desktopfile_objs >)
22+
23+ # needs to be included in all three targets
24+ foreach (target linuxdeploy_desktopfile linuxdeploy_desktopfile_static _linuxdeploy_desktopfile_objs)
25+ target_include_directories (${target} PUBLIC ${PROJECT_SOURCE_DIR} /include )
26+ endforeach ()
You can’t perform that action at this time.
0 commit comments