diff options
author | fuzzard <fuzzard@kodi.tv> | 2022-05-28 19:26:30 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2023-10-26 14:04:37 +1000 |
commit | c875e4fb6687355c99b3d43d86c1d6f6e0352ee5 (patch) | |
tree | 661fbdea239cf28ed892b39a89aaf666baf36aeb /tools/depends | |
parent | 0cacc6b1156dcd15323c57ff454ab247dd994147 (diff) |
[cmake] Create P8-Platform find module
Apply patches for p8-platform to fix potential cmake install location issues
Diffstat (limited to 'tools/depends')
-rw-r--r-- | tools/depends/target/p8-platform/001-all-fix-c++17-support.patch (renamed from tools/depends/target/p8-platform/0001-fix-c++17-support.patch) | 0 | ||||
-rw-r--r-- | tools/depends/target/p8-platform/002-all-fixcmakeinstall.patch | 29 | ||||
-rw-r--r-- | tools/depends/target/p8-platform/003-all-cmake_tweakversion.patch | 21 | ||||
-rw-r--r-- | tools/depends/target/p8-platform/Makefile | 23 | ||||
-rw-r--r-- | tools/depends/target/p8-platform/P8-PLATFORM-VERSION | 6 |
5 files changed, 66 insertions, 13 deletions
diff --git a/tools/depends/target/p8-platform/0001-fix-c++17-support.patch b/tools/depends/target/p8-platform/001-all-fix-c++17-support.patch index 25fbe483fe..25fbe483fe 100644 --- a/tools/depends/target/p8-platform/0001-fix-c++17-support.patch +++ b/tools/depends/target/p8-platform/001-all-fix-c++17-support.patch diff --git a/tools/depends/target/p8-platform/002-all-fixcmakeinstall.patch b/tools/depends/target/p8-platform/002-all-fixcmakeinstall.patch new file mode 100644 index 0000000000..be22576415 --- /dev/null +++ b/tools/depends/target/p8-platform/002-all-fixcmakeinstall.patch @@ -0,0 +1,29 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,10 @@ + set_target_properties(p8-platform PROPERTIES VERSION ${p8-platform_VERSION_MAJOR}.${p8-platform_VERSION_MINOR}.${p8-platform_VERSION_PATCH} + SOVERSION ${p8-platform_VERSION_MAJOR}) + +-install(TARGETS p8-platform DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(TARGETS p8-platform ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) + install(FILES src/os.h DESTINATION include/p8-platform) + IF(WIN32) + INSTALL(FILES src/windows/dlfcn-win32.h +@@ -74,12 +77,12 @@ + IF(NOT WIN32) + configure_file(p8-platform.pc.in p8-platform.pc @ONLY) + install(FILES ${CMAKE_BINARY_DIR}/p8-platform.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ DESTINATION lib/pkgconfig) + ENDIF(NOT WIN32) + + # config mode + configure_file (p8-platform-config.cmake.in + p8-platform-config.cmake @ONLY) + install(FILES ${CMAKE_BINARY_DIR}/p8-platform-config.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/p8-platform) ++ DESTINATION lib/cmake/p8-platform) + diff --git a/tools/depends/target/p8-platform/003-all-cmake_tweakversion.patch b/tools/depends/target/p8-platform/003-all-cmake_tweakversion.patch new file mode 100644 index 0000000000..24b9a65654 --- /dev/null +++ b/tools/depends/target/p8-platform/003-all-cmake_tweakversion.patch @@ -0,0 +1,21 @@ +--- a/p8-platform-config.cmake.in ++++ b/p8-platform-config.cmake.in +@@ -9,7 +9,7 @@ + # p8-platform_LIBRARY_DIRS - directories in which the libraries are situated + # + # propagate these properties from one build system to the other +-set (p8-platform_VERSION "@p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@") ++set (p8-platform_VERSION "@p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@.@p8-platform_VERSION_PATCH@.@p8-platform_VERSION_TWEAK@") + set (p8-platform_INCLUDE_DIRS @p8-platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include) + set (p8-platform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@") + set (p8-platform_LINKER_FLAGS "@p8-platform_LINKER_FLAGS@") +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,6 +14,7 @@ + set(p8-platform_VERSION_MAJOR 2) + set(p8-platform_VERSION_MINOR 1) + set(p8-platform_VERSION_PATCH 0) ++set(p8-platform_VERSION_TWEAK 1) + + set(CMAKE_POSITION_INDEPENDENT_CODE on) + diff --git a/tools/depends/target/p8-platform/Makefile b/tools/depends/target/p8-platform/Makefile index 649c638b9a..4d3fd00cb4 100644 --- a/tools/depends/target/p8-platform/Makefile +++ b/tools/depends/target/p8-platform/Makefile @@ -1,15 +1,10 @@ -include ../../Makefile.include -DEPS = ../../Makefile.include Makefile 0001-fix-c++17-support.patch ../../download-files.include +include ../../Makefile.include P8-PLATFORM-VERSION ../../download-files.include +DEPS = ../../Makefile.include Makefile P8-PLATFORM-VERSION ../../download-files.include \ + 001-all-fix-c++17-support.patch \ + 002-all-fixcmakeinstall.patch \ + 003-all-cmake_tweakversion.patch -# lib name, version -LIBNAME=p8-platform -VERSION=2.1.0.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz -SHA512=10f8e3ca8ea7a48923a4cc57d47015b56b4bdbf78997ba77abd9fc2f929198fda16dfb869ba69eec393ab4b635be916c3ed9a07d6989bf8265aa055794e84bf7 -include ../../download-files.include - -LIBDYLIB=$(PLATFORM)/build/lib$(LIBNAME).a +LIBDYLIB=$(PLATFORM)/build/$(BYPRODUCT) all: .installed-$(PLATFORM) @@ -17,8 +12,10 @@ all: .installed-$(PLATFORM) $(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) rm -rf $(PLATFORM); mkdir -p $(PLATFORM)/build cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - cd $(PLATFORM); patch -p1 -i ../0001-fix-c++17-support.patch - cd $(PLATFORM)/build; $(CMAKE) -DBUILD_SHARED_LIBS=0 -DCMAKE_INSTALL_LIBDIR=$(PREFIX)/lib .. + cd $(PLATFORM); patch -p1 -i ../001-all-fix-c++17-support.patch + cd $(PLATFORM); patch -p1 -i ../002-all-fixcmakeinstall.patch + cd $(PLATFORM); patch -p1 -i ../003-all-cmake_tweakversion.patch + cd $(PLATFORM)/build; $(CMAKE) -DBUILD_SHARED_LIBS=0 .. $(LIBDYLIB): $(PLATFORM) $(MAKE) -C $(PLATFORM)/build diff --git a/tools/depends/target/p8-platform/P8-PLATFORM-VERSION b/tools/depends/target/p8-platform/P8-PLATFORM-VERSION new file mode 100644 index 0000000000..f9ac55968e --- /dev/null +++ b/tools/depends/target/p8-platform/P8-PLATFORM-VERSION @@ -0,0 +1,6 @@ +LIBNAME=p8-platform +VERSION=2.1.0.1 +ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz +SHA512=10f8e3ca8ea7a48923a4cc57d47015b56b4bdbf78997ba77abd9fc2f929198fda16dfb869ba69eec393ab4b635be916c3ed9a07d6989bf8265aa055794e84bf7 +BYPRODUCT=libp8-platform.a +BYPRODUCT_WIN=p8-platform.lib |