Skip to content
Snippets Groups Projects
Commit c80e3713 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

cmake: install DLL files to the bin/ directory

This is where runtime libraries should live on Windows.
parent 370ed890
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,9 @@ endif() ...@@ -104,6 +104,9 @@ endif()
if (NOT DEFINED diy_install_include_dir) if (NOT DEFINED diy_install_include_dir)
set(diy_install_include_dir "include") set(diy_install_include_dir "include")
endif() endif()
if (NOT DEFINED diy_install_bin_dir)
set(diy_install_bin_dir "bin")
endif()
if (NOT DEFINED diy_install_lib_dir) if (NOT DEFINED diy_install_lib_dir)
set(diy_install_lib_dir "lib") set(diy_install_lib_dir "lib")
endif() endif()
...@@ -246,7 +249,10 @@ if (NOT DEFINED diy_install_only_libraries) # defined by parent project if build ...@@ -246,7 +249,10 @@ if (NOT DEFINED diy_install_only_libraries) # defined by parent project if build
endif() endif()
endif() endif()
install(TARGETS ${diy_targets} EXPORT ${diy_export_name} DESTINATION ${diy_install_lib_dir}) install(TARGETS ${diy_targets} EXPORT ${diy_export_name}
ARCHIVE DESTINATION ${diy_install_lib_dir}
LIBRARY DESTINATION ${diy_install_lib_dir}
RUNTIME DESTINATION ${diy_install_bin_dir})
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) # Only generate these files when diy is the main project if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) # Only generate these files when diy is the main project
export(EXPORT ${diy_export_name} NAMESPACE DIY:: FILE "${PROJECT_BINARY_DIR}/diy-targets.cmake") export(EXPORT ${diy_export_name} NAMESPACE DIY:: FILE "${PROJECT_BINARY_DIR}/diy-targets.cmake")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment