Skip to content

Commit

Permalink
Add GSL_INSTALL_MULTI_CONFIG option.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed May 8, 2014
1 parent 991140d commit 0cf4758
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions CMakeLists.txt
Expand Up @@ -592,9 +592,21 @@ endforeach ()
add_library(gsl ${GSL_SOURCES})
add_dependencies(gsl copy-headers)

install(TARGETS gsl gslcblas
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib)
option(GSL_INSTALL_MULTI_CONFIG "Installs libraries in lib/<config> directory" OFF)

if (MSVC AND GSL_INSTALL_MULTI_CONFIG)
foreach(config ${CMAKE_CONFIGURATION_TYPES})
install(TARGETS gsl gslcblas
CONFIGURATIONS ${config}
LIBRARY DESTINATION lib/${config}
RUNTIME DESTINATION bin/${config}
ARCHIVE DESTINATION lib/${config})
endforeach ()
else ()
install(TARGETS gsl gslcblas
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib)
endif ()

install(FILES ${GSL_HEADER_PATHS} DESTINATION include/gsl)

0 comments on commit 0cf4758

Please sign in to comment.