Skip to content

Commit

Permalink
Remove the CMAKE_INSTALL_PREFIX from the target repository and let xr…
Browse files Browse the repository at this point in the history
…epo set this variable itself to solve the problem of source and library files not being copied to the package directory.
  • Loading branch information
ZhangXiChang committed Aug 25, 2024
1 parent b74389e commit f9b007c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 7 additions & 7 deletions packages/s/spine-cpp/patches/3.8/fix.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17d865734..cdd4eab5f 100644
index 17d865734..9a5787b7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,37 +1,7 @@
@@ -1,37 +1,6 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 3.5)
project(spine)
Expand All @@ -15,7 +15,6 @@ index 17d865734..cdd4eab5f 100644
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused-value -Wno-c++11-long-long -Wno-variadic-macros -Werror -Wextra -pedantic -Wnonportable-include-path -Wshadow -std=c89")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused-value -Wno-c++11-long-long -Wno-variadic-macros -Werror -Wextra -Wnon-virtual-dtor -pedantic -Wnonportable-include-path -Wshadow -std=c++03 -fno-exceptions -fno-rtti")
-endif()
+set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install)
+include(GNUInstallDirs)

-set(CMAKE_INSTALL_PREFIX "./")
Expand Down Expand Up @@ -46,10 +45,10 @@ index 17d865734..cdd4eab5f 100644
\ No newline at end of file
+add_subdirectory(spine-cpp)
diff --git a/spine-cpp/CMakeLists.txt b/spine-cpp/CMakeLists.txt
index 706040cab..639393497 100644
index 706040cab..d5fac84aa 100644
--- a/spine-cpp/CMakeLists.txt
+++ b/spine-cpp/CMakeLists.txt
@@ -1,17 +1,8 @@
@@ -1,17 +1,9 @@
-if(MSVC)
- message("MSCV detected")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
Expand All @@ -68,5 +67,6 @@ index 706040cab..639393497 100644
-install(TARGETS spine-cpp DESTINATION dist/lib)
-install(FILES ${INCLUDES} DESTINATION dist/include)
\ No newline at end of file
+install(TARGETS spine-cpp DESTINATION lib)
+install(FILES ${INCLUDES} DESTINATION include)
+
+install(TARGETS spine-cpp DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(DIRECTORY "./spine-cpp/include/spine" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
2 changes: 0 additions & 2 deletions packages/s/spine-cpp/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ package("spine-cpp")
local configs={}
table.insert(configs,"-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package,configs)
--os.cp("./include", package:installdir())
--os.cp("./lib", package:installdir())
end)
on_test(function (package)
assert(package:check_cxxsnippets({test=[[
Expand Down

0 comments on commit f9b007c

Please sign in to comment.