24 lines
908 B
Diff
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)
|