Skip to content

Commit

Permalink
odr fix install (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand authored May 26, 2024
1 parent 48de8dd commit ada534d
Show file tree
Hide file tree
Showing 11 changed files with 191 additions and 4 deletions.
38 changes: 34 additions & 4 deletions recipes/odrcore/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,41 @@ sources:
sha256: "b2d671f34bf641d465dfaae9adefdcb4a6210d58a519594a182ba2839531435e"

patches:
"1.0.0":
- patch_file: "patches/1.0.0-0001-fix-cmake-install.patch"
patch_description: "Fix header install in CMakeLists.txt"
patch_type: "conan"
"2.0.0":
- patch_file: "patches/2.0.0-0001-fix-cmake.patch"
patch_description: "Fix broken dependencies in CMakeLists.txt"
- patch_file: "patches/2.0.0-0001-fix-cmake-uchardet.patch"
patch_description: "Fix broken dependency in CMakeLists.txt"
patch_type: "conan"
- patch_file: "patches/2.0.0-0002-fix-cmake-install.patch"
patch_description: "Fix header install in CMakeLists.txt"
patch_type: "conan"
"2.1.0":
- patch_file: "patches/2.1.0-0001-fix-cmake-install.patch"
patch_description: "Fix header install in CMakeLists.txt"
patch_type: "conan"
"2.1.1":
- patch_file: "patches/2.1.1-0001-fix-cmake-install.patch"
patch_description: "Fix header install in CMakeLists.txt"
patch_type: "conan"
"2.1.2":
- patch_file: "patches/2.1.2-0001-fix-cmake-install.patch"
patch_description: "Fix header install in CMakeLists.txt"
patch_type: "conan"
"2.2.0":
- patch_file: "patches/2.2.0-0001-fix-cmake-install.patch"
patch_description: "Fix header install in CMakeLists.txt"
patch_type: "conan"
"3.0.0":
- patch_file: "patches/3.0.0-0001-fix-cmake-install.patch"
patch_description: "Fix header install in CMakeLists.txt"
patch_type: "conan"
"4.0.0":
- patch_file: "patches/4.0.0-0001-fix-cmake.patch"
patch_description: "Fix broken dependencies in CMakeLists.txt"
- patch_file: "patches/4.0.0-0001-fix-cmake-utf8cpp.patch"
patch_description: "Fix broken dependency in CMakeLists.txt"
patch_type: "conan"
- patch_file: "patches/4.0.0-0002-fix-cmake-install.patch"
patch_description: "Fix header install in CMakeLists.txt"
patch_type: "conan"
25 changes: 25 additions & 0 deletions recipes/odrcore/all/patches/1.0.0-0001-fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a27624..93a9966 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -95,3 +95,20 @@ set_property(TARGET odrlib PROPERTY POSITION_INDEPENDENT_CODE ON)
add_subdirectory("test")

add_subdirectory("main")
+
+install(
+ DIRECTORY include/
+ DESTINATION include/
+)
+install(
+ DIRECTORY src/
+ DESTINATION include/
+ FILES_MATCHING PATTERN "*.h"
+)
+install(
+ TARGETS odrlib odrmain
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
20 changes: 20 additions & 0 deletions recipes/odrcore/all/patches/2.0.0-0002-fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 746026d..398f751 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -181,6 +181,15 @@ if (ODR_TEST)
add_subdirectory(test)
endif ()

+install(
+ DIRECTORY include/
+ DESTINATION include/
+)
+install(
+ DIRECTORY src/
+ DESTINATION include/
+ FILES_MATCHING PATTERN "*.h"
+)
install(
TARGETS
odr-static
20 changes: 20 additions & 0 deletions recipes/odrcore/all/patches/2.1.0-0001-fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc99fa9..28bd28a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -195,6 +195,15 @@ if (ODR_TEST)
add_subdirectory(test)
endif ()

+install(
+ DIRECTORY include/
+ DESTINATION include/
+ )
+install(
+ DIRECTORY src/
+ DESTINATION include/
+ FILES_MATCHING PATTERN "*.h"
+ )
install(
TARGETS
odr
20 changes: 20 additions & 0 deletions recipes/odrcore/all/patches/2.1.1-0001-fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc99fa9..28bd28a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -195,6 +195,15 @@ if (ODR_TEST)
add_subdirectory(test)
endif ()

+install(
+ DIRECTORY include/
+ DESTINATION include/
+ )
+install(
+ DIRECTORY src/
+ DESTINATION include/
+ FILES_MATCHING PATTERN "*.h"
+ )
install(
TARGETS
odr
20 changes: 20 additions & 0 deletions recipes/odrcore/all/patches/2.1.2-0001-fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c097cb..7553706 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -192,6 +192,15 @@ if (ODR_TEST)
add_subdirectory(test)
endif ()

+install(
+ DIRECTORY include/
+ DESTINATION include/
+ )
+install(
+ DIRECTORY src/
+ DESTINATION include/
+ FILES_MATCHING PATTERN "*.h"
+ )
install(
TARGETS
odr
20 changes: 20 additions & 0 deletions recipes/odrcore/all/patches/2.2.0-0001-fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a037876..d51df1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,6 +189,15 @@ if (ODR_TEST)
add_subdirectory(test)
endif ()

+install(
+ DIRECTORY include/
+ DESTINATION include/
+ )
+install(
+ DIRECTORY src/
+ DESTINATION include/
+ FILES_MATCHING PATTERN "*.h"
+ )
install(
TARGETS
odr
16 changes: 16 additions & 0 deletions recipes/odrcore/all/patches/3.0.0-0001-fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51afb68..be0e892 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,6 +189,11 @@ if (ODR_CLANG_TIDY)
add_subdirectory("static_analysis/clang-tidy")
endif ()

+install(
+ DIRECTORY src/
+ DESTINATION include/
+ FILES_MATCHING PATTERN "*.hpp"
+)
install(
TARGETS
odr
16 changes: 16 additions & 0 deletions recipes/odrcore/all/patches/4.0.0-0002-fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6277ef..557df44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -209,6 +209,11 @@ if (ODR_CLANG_TIDY)
add_subdirectory("static_analysis/clang-tidy")
endif ()

+install(
+ DIRECTORY src/
+ DESTINATION include/
+ FILES_MATCHING PATTERN "*.hpp"
+)
install(
TARGETS
odr

0 comments on commit ada534d

Please sign in to comment.