From 7d18898e2cfbf7399d72cb066c5121c0fc31c0e3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 4 Jun 2018 23:45:08 +0200 Subject: [PATCH] cmake: only install shared libraries --- cmake_options.cmake | 2 -- rwengine/CMakeLists.txt | 2 +- rwlib/CMakeLists.txt | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake_options.cmake b/cmake_options.cmake index b38bd331..ecce5f62 100644 --- a/cmake_options.cmake +++ b/cmake_options.cmake @@ -14,8 +14,6 @@ set_property(CACHE FAILED_CHECK_ACTION PROPERTY STRINGS "IGNORE" "ABORT" "BREAKP set(FILESYSTEM_LIBRARY "BOOST" CACHE STRING "Which filesystem library to use") set_property(CACHE FILESYSTEM_LIBRARY PROPERTY STRINGS "CXX17" "CXXTS" "BOOST") -option(INSTALL_LIBS "Install rwengine libraries") - if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Debug Release") endif() diff --git a/rwengine/CMakeLists.txt b/rwengine/CMakeLists.txt index 48115ca5..3fbe13e6 100644 --- a/rwengine/CMakeLists.txt +++ b/rwengine/CMakeLists.txt @@ -160,7 +160,7 @@ target_include_directories(rwengine openrw_target_apply_options(TARGET rwengine) -if(INSTALL_LIBS) +if(BUILD_SHARED_LIBS) install(TARGETS rwengine ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" diff --git a/rwlib/CMakeLists.txt b/rwlib/CMakeLists.txt index 67862d61..579ee3c3 100644 --- a/rwlib/CMakeLists.txt +++ b/rwlib/CMakeLists.txt @@ -65,7 +65,7 @@ target_link_libraries(rwlib openrw_target_apply_options(TARGET rwlib) -if(INSTALL_LIBS) +if(BUILD_SHARED_LIBS) install(TARGETS rwlib ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"