45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 0124dc7..c048fb8 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -70,16 +70,15 @@ target_include_directories(EASTL PUBLIC include)
|
|
#-------------------------------------------------------------------------------------------
|
|
# Dependencies
|
|
#-------------------------------------------------------------------------------------------
|
|
-FetchContent_Declare(
|
|
- EABase
|
|
- GIT_REPOSITORY https://github.com/electronicarts/EABase.git
|
|
- GIT_TAG 0699a15efdfd20b6cecf02153bfa5663decb653c
|
|
- GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EABase.
|
|
-)
|
|
-
|
|
-FetchContent_MakeAvailable(EABase)
|
|
-
|
|
-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()
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Deprecations
|
|
@@ -98,6 +97,13 @@ endif()
|
|
#-------------------------------------------------------------------------------------------
|
|
# Installation
|
|
#-------------------------------------------------------------------------------------------
|
|
+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)
|
|
+
|
|
install(TARGETS EASTL DESTINATION lib)
|
|
install(DIRECTORY include/EASTL DESTINATION include)
|
|
|