Files
ConanPackages/eastl/all/patches/3.15.00-0001-cmake-shared-use-conan-add-install.patch
2026-01-23 22:15:36 +01:00

24 lines
908 B
Diff

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,5 +46,19 @@ target_include_directories(EASTL PUBLIC include)
#-------------------------------------------------------------------------------------------
# Dependencies
#-------------------------------------------------------------------------------------------
-target_link_libraries(EASTL EABase)
+find_package(EABase REQUIRED CONFIG)
+target_link_libraries(EASTL EABase::EABase)
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(EASTL PUBLIC EASTL_DLL)
+ if(MSVC OR CYGWIN)
+ target_compile_definitions(EASTL PRIVATE "EASTL_API=__declspec(dllexport)")
+ endif()
+endif()
+
+include(GNUInstallDirs)
+install(TARGETS EASTL
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(DIRECTORY ${CMAKE_INSTALL_INCLUDEDIR}/EASTL DESTINATION include)