diff --git a/CMakeLists.txt b/CMakeLists.txt index 7884456..6d51ebc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,6 @@ option(EATHREAD_BUILD_TESTS "Enable generation of build files for tests" OFF) # Compiler Flags (TODO: do we really need this?) #------------------------------------------------------------------------------------------- set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/scripts/Cmake" CACHE INTERNAL "Inject path to CommonCppFlags") -include(CommonCppFlags) #------------------------------------------------------------------------------------------- # Library definition @@ -36,16 +35,18 @@ target_include_directories(EAThread PUBLIC include) #------------------------------------------------------------------------------------------- # Package Dependencies #------------------------------------------------------------------------------------------- -FetchContent_Declare( - EABase - GIT_REPOSITORY https://github.com/electronicarts/EABase.git - GIT_TAG 123363eb82e132c0181ac53e43226d8ee76dea12 - GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EABase. -) +find_package(EABase REQUIRED CONFIG) +target_link_libraries(EAThread EABase::EABase) -FetchContent_MakeAvailable(EABase) - -target_link_libraries(EAThread EABase) +#------------------------------------------------------------------------------------------- +# Installation +#------------------------------------------------------------------------------------------- +include(GNUInstallDirs) +install(TARGETS EAThread + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(DIRECTORY include/eathread DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) if(EATHREAD_BUILD_TESTS) add_subdirectory(test)