From f442148670ddfbc8771fbd4ad7fbb11181aad733 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 21 May 2014 14:16:34 -0700 Subject: [PATCH] poco: library install dirs per RUNTIME/LIBRARY/ARCHIVE For a unix system, this commit implies no changes by default. However, the ${LIB_SUFFIX} convention was added so the build can be configured for a red-hat style installation which uses lib64 by specifying cmake -DLIB_SUFFIX=64 For a windows build (msvc), this commit will cause the .dll files to be installed in the bin/ path; import libraries .lib are still installed in the lib/ path. Installing dlls into the bin path is preferable because dlls must be in the executable %PATH% to be found at runtime, as there is not equivalent of a separate library path as there is on unix. --- Crypto/CMakeLists.txt | 4 +++- Data/CMakeLists.txt | 4 +++- Data/MySQL/CMakeLists.txt | 4 +++- Data/ODBC/CMakeLists.txt | 4 +++- Data/SQLite/CMakeLists.txt | 4 +++- Foundation/CMakeLists.txt | 4 +++- JSON/CMakeLists.txt | 4 +++- MongoDB/CMakeLists.txt | 4 +++- Net/CMakeLists.txt | 4 +++- NetSSL_OpenSSL/CMakeLists.txt | 4 +++- PDF/CMakeLists.txt | 4 +++- Util/CMakeLists.txt | 4 +++- XML/CMakeLists.txt | 4 +++- Zip/CMakeLists.txt | 4 +++- 14 files changed, 42 insertions(+), 14 deletions(-) diff --git a/Crypto/CMakeLists.txt b/Crypto/CMakeLists.txt index 1f1ea81e0..38652d2f9 100644 --- a/Crypto/CMakeLists.txt +++ b/Crypto/CMakeLists.txt @@ -23,7 +23,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/Data/CMakeLists.txt b/Data/CMakeLists.txt index 343e81230..0c0ed1242 100644 --- a/Data/CMakeLists.txt +++ b/Data/CMakeLists.txt @@ -27,7 +27,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) add_subdirectory( SQLite ) diff --git a/Data/MySQL/CMakeLists.txt b/Data/MySQL/CMakeLists.txt index 2681b095d..a2a2d79bf 100644 --- a/Data/MySQL/CMakeLists.txt +++ b/Data/MySQL/CMakeLists.txt @@ -22,7 +22,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/Data/ODBC/CMakeLists.txt b/Data/ODBC/CMakeLists.txt index 85ea69cd5..40b61399d 100644 --- a/Data/ODBC/CMakeLists.txt +++ b/Data/ODBC/CMakeLists.txt @@ -35,7 +35,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/Data/SQLite/CMakeLists.txt b/Data/SQLite/CMakeLists.txt index e7e8d69d3..0a5ca15ea 100644 --- a/Data/SQLite/CMakeLists.txt +++ b/Data/SQLite/CMakeLists.txt @@ -39,7 +39,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt index d858c0c38..b9f07530a 100644 --- a/Foundation/CMakeLists.txt +++ b/Foundation/CMakeLists.txt @@ -249,7 +249,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/JSON/CMakeLists.txt b/JSON/CMakeLists.txt index 87ea0bcf1..e573d8039 100644 --- a/JSON/CMakeLists.txt +++ b/JSON/CMakeLists.txt @@ -20,7 +20,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/MongoDB/CMakeLists.txt b/MongoDB/CMakeLists.txt index 3dd5302f8..5c7e229be 100644 --- a/MongoDB/CMakeLists.txt +++ b/MongoDB/CMakeLists.txt @@ -20,7 +20,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/Net/CMakeLists.txt b/Net/CMakeLists.txt index 5a824dedf..c9319c81d 100644 --- a/Net/CMakeLists.txt +++ b/Net/CMakeLists.txt @@ -131,7 +131,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/NetSSL_OpenSSL/CMakeLists.txt b/NetSSL_OpenSSL/CMakeLists.txt index 8c84a58bf..ed9624e4c 100644 --- a/NetSSL_OpenSSL/CMakeLists.txt +++ b/NetSSL_OpenSSL/CMakeLists.txt @@ -21,7 +21,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/PDF/CMakeLists.txt b/PDF/CMakeLists.txt index ad907ef2a..ff41ed957 100644 --- a/PDF/CMakeLists.txt +++ b/PDF/CMakeLists.txt @@ -21,7 +21,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/Util/CMakeLists.txt b/Util/CMakeLists.txt index b1de5183f..592b33db1 100644 --- a/Util/CMakeLists.txt +++ b/Util/CMakeLists.txt @@ -57,7 +57,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt index c76cf3eed..02586f802 100644 --- a/XML/CMakeLists.txt +++ b/XML/CMakeLists.txt @@ -18,7 +18,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS) diff --git a/Zip/CMakeLists.txt b/Zip/CMakeLists.txt index 9fed43ae8..b32fea9cf 100644 --- a/Zip/CMakeLists.txt +++ b/Zip/CMakeLists.txt @@ -20,7 +20,9 @@ install( install( TARGETS ${LIBNAME} - DESTINATION lib + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin ) if (ENABLE_TESTS)