aboutsummaryrefslogtreecommitdiff
path: root/lib/libexif
diff options
context:
space:
mode:
authorChristian Fetzer <fetzer.ch@gmail.com>2016-07-17 15:48:17 +0200
committerChristian Fetzer <fetzer.ch@gmail.com>2016-07-21 12:24:31 +0200
commit66f8216277841ca8db4b2092bcfee88d39bb1ecf (patch)
tree7384a06c8cc4af8faf32083f1814fcc57ffaea92 /lib/libexif
parentfcefeb5e6b838c49923eb85eccda80c626506aa3 (diff)
[cmake] Change the way shared libraries are built
Before this change shared libraries were built by creating a static library using core_add_library and then linking that into a shared/module one using core_link_libraries. This has a few drawbacks: - Meanwhile most libraries don't use wrapping (for VFS support) anymore, and we can use CMake mechanisms to create those libraries. - The approach doesn't work with MSVC as there is no "whole-archive" option. On windows these symbols would need different exporting. - The main usage of core_add_library is to generate small libraries for the Kodi main application. Let's use it only for that. This is in preparation to disable building of per folder static libraries because they don't work well with VS and Xcode. This commit introduces the following changes: - Shared/Module libraries are now created with core_add_shared_library, addon callback libraries are now created with core_add_addon_library. - Fix dependencies: make kodi now builds everything needed to run kodi including all dl-loaded libraries. - Only use wrapping for libraries where it's also done with Autotools - WRAP_FILES and wrap-libraries are renamed to LIBRARY_FILES and kodi-libraries. - Library wrapping and generation now works in all subdirectories. Previously core_link_libraries had to be called in the main CMakeLists.txt because file dependencies in add_custom_command only work in the same directory. This also made it necessary to create wrap_* targets. - Generator expressions in core_link_libraries make the function less error prone.
Diffstat (limited to 'lib/libexif')
-rw-r--r--lib/libexif/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libexif/CMakeLists.txt b/lib/libexif/CMakeLists.txt
index d21d4fc1d8..6ecc48a54a 100644
--- a/lib/libexif/CMakeLists.txt
+++ b/lib/libexif/CMakeLists.txt
@@ -3,7 +3,11 @@ set(SOURCES ExifParse.cpp
JpegParse.cpp
libexif.cpp)
-set(CMAKE_POSITION_INDEPENDENT_CODE 1)
+set(HEADERS ExifParse.h
+ IptcParse.h
+ JpegParse.h
+ libexif.h)
-core_add_library(exif NO_MAIN_DEPENDS)
+core_add_shared_library(exif WRAPPED)
target_compile_definitions(exif PRIVATE _LINUX _DLL)
+set_target_properties(exif PROPERTIES FOLDER lib)