You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by mt...@apache.org on 2021/12/03 09:38:44 UTC

svn commit: r1895541 - /apr/apr/trunk/CMakeLists.txt

Author: mturk
Date: Fri Dec  3 09:38:43 2021
New Revision: 1895541

URL: http://svn.apache.org/viewvc?rev=1895541&view=rev
Log:
Do not install import libraries for DSO modules

Modified:
    apr/apr/trunk/CMakeLists.txt

Modified: apr/apr/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CMakeLists.txt?rev=1895541&r1=1895540&r2=1895541&view=diff
==============================================================================
--- apr/apr/trunk/CMakeLists.txt (original)
+++ apr/apr/trunk/CMakeLists.txt Fri Dec  3 09:38:43 2021
@@ -476,6 +476,7 @@ SET(APR_TEST_SOURCES
 )
 
 SET(install_targets)
+SET(install_modules)
 SET(install_bin_pdb)
 SET(dbd_drivers)
 
@@ -508,7 +509,7 @@ IF(APU_HAVE_CRYPTO)
     MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build")
   ENDIF()
   ADD_LIBRARY(apr_crypto_openssl-2 SHARED crypto/apr_crypto_openssl.c libapr.rc)
-  LIST(APPEND install_targets apr_crypto_openssl-2)
+  LIST(APPEND install_modules ${PROJECT_BINARY_DIR}/apr_crypto_openssl-2.dll)
   LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_crypto_openssl-2.pdb)
   TARGET_LINK_LIBRARIES(apr_crypto_openssl-2 ${apr_libname} ${APR_SYSTEM_LIBS} ${OPENSSL_LIBRARIES})
   SET_TARGET_PROPERTIES(apr_crypto_openssl-2 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}")
@@ -518,7 +519,7 @@ ENDIF()
 
 IF(APU_HAVE_ODBC)
   ADD_LIBRARY(apr_dbd_odbc-2 SHARED dbd/apr_dbd_odbc.c libapr.rc)
-  LIST(APPEND install_targets apr_dbd_odbc-2)
+  LIST(APPEND install_modules ${PROJECT_BINARY_DIR}/apr_dbd_odbc-2.dll)
   LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_dbd_odbc-2.pdb)
   LIST(APPEND dbd_drivers odbc)
   TARGET_LINK_LIBRARIES(apr_dbd_odbc-2 ${apr_libname} ${APR_SYSTEM_LIBS} odbc32 odbccp32)
@@ -529,7 +530,7 @@ ENDIF()
 
 IF(APU_HAVE_SQLITE3)
   ADD_LIBRARY(apr_dbd_sqlite3-2 SHARED dbd/apr_dbd_sqlite3.c libapr.rc)
-  LIST(APPEND install_targets apr_dbd_sqlite3-2)
+  LIST(APPEND install_modules ${PROJECT_BINARY_DIR}/apr_dbd_sqlite3-2.dll)
   LIST(APPEND install_bin_pdb ${PROJECT_BINARY_DIR}/apr_dbd_sqlite3-2.pdb)
   LIST(APPEND dbd_drivers sqlite3)
   TARGET_LINK_LIBRARIES(apr_dbd_sqlite3-2 ${apr_libname} ${APR_SYSTEM_LIBS} ${SQLite3_LIBRARIES})
@@ -661,6 +662,10 @@ INSTALL(TARGETS ${install_targets}
         ARCHIVE DESTINATION lib
        )
 
+# For DSO modules, install only binaries
+INSTALL(FILES ${install_modules}
+        DESTINATION bin)
+
 IF(INSTALL_PDB)
   INSTALL(FILES ${install_bin_pdb}
           DESTINATION bin



Re: svn commit: r1895541 - /apr/apr/trunk/CMakeLists.txt

Posted by Mladen Turk <mt...@apache.org>.

On 17/01/2022 05:53, William A Rowe Jr wrote:
> On Fri, Dec 3, 2021 at 5:39 AM Mladen Turk <mt...@apache.org> wrote:
>>
>> On 03/12/2021 12:35, Yann Ylavic wrote:
>>> After all those CMakeLists changes, is building with cmake now
>>> dedicated to Windows or does/can it work on *nixes too?
>>> I never tried building with cmake so far on *nix, so just wondering..
>>
>> Even before the changes CMakeLists was windows only.
>> All unixes works perfectly with configure && make.
>>
>> Anyhow, here's the latest status
>> https://pastebin.com/gBxYtSZE
> 
> FWIW, on my current project I have closer to 40 dependencies, not just
> a dozen. And nearly every one is built under cmake. And not with cmake's
> ideas of rules, but Bazel injection of cflags/ldflags for unix or windows,
> and I realized we can choose a platform, and trick cmake to not do much
> extra anything by injecting a "bazel" target, not debug/release etc.
> 
> That's where I've been spinning my wheels.
> 
> It would be really useful if apr supported cmake builds on linux. I'm ok
> with helping to see that happen. And it makes cmake a first class build
> schema for us, whether one chooses autocruft ./configure, or cmake.
> It should all produce a usable result
> 

Have no problem with cmake/linux. However, adding it to the current 
CmakeLists would IMO just spaghettify it. Perhaps splitting with
OS include macros or something?

Regards
-- 
^TM

Re: svn commit: r1895541 - /apr/apr/trunk/CMakeLists.txt

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Fri, Dec 3, 2021 at 5:39 AM Mladen Turk <mt...@apache.org> wrote:
>
> On 03/12/2021 12:35, Yann Ylavic wrote:
> > After all those CMakeLists changes, is building with cmake now
> > dedicated to Windows or does/can it work on *nixes too?
> > I never tried building with cmake so far on *nix, so just wondering..
>
> Even before the changes CMakeLists was windows only.
> All unixes works perfectly with configure && make.
>
> Anyhow, here's the latest status
> https://pastebin.com/gBxYtSZE

FWIW, on my current project I have closer to 40 dependencies, not just
a dozen. And nearly every one is built under cmake. And not with cmake's
ideas of rules, but Bazel injection of cflags/ldflags for unix or windows,
and I realized we can choose a platform, and trick cmake to not do much
extra anything by injecting a "bazel" target, not debug/release etc.

That's where I've been spinning my wheels.

It would be really useful if apr supported cmake builds on linux. I'm ok
with helping to see that happen. And it makes cmake a first class build
schema for us, whether one chooses autocruft ./configure, or cmake.
It should all produce a usable result

Re: svn commit: r1895541 - /apr/apr/trunk/CMakeLists.txt

Posted by Mladen Turk <mt...@apache.org>.

On 03/12/2021 12:35, Yann Ylavic wrote:
> After all those CMakeLists changes, is building with cmake now
> dedicated to Windows or does/can it work on *nixes too?
> I never tried building with cmake so far on *nix, so just wondering..
> 

Even before the changes CMakeLists was windows only.
All unixes works perfectly with configure && make.


Anyhow, here's the latest status
https://pastebin.com/gBxYtSZE

Regards
-- 
^TM

Re: svn commit: r1895541 - /apr/apr/trunk/CMakeLists.txt

Posted by Yann Ylavic <yl...@gmail.com>.
After all those CMakeLists changes, is building with cmake now
dedicated to Windows or does/can it work on *nixes too?
I never tried building with cmake so far on *nix, so just wondering..

Cheers;
Yann.