Re: [CMake] creating a library from other one

2018-08-31 Thread Stéphane Ancelot
Le 31/08/2018 à 16:31, Eric Noulard a écrit : Le ven. 31 août 2018 à 15:59, Stéphane Ancelot mailto:sance...@numalliance.com>> a écrit : I ended with : add_custom_target(combined ALL    COMMAND ${CMAKE_AR} rc libcombined.a $ $) Quick & dirty :-) There is the "thin"

Re: [CMake] creating a library from other one

2018-08-31 Thread Eric Noulard
Le ven. 31 août 2018 à 15:59, Stéphane Ancelot a écrit : > I ended with : > > add_custom_target(combined ALL >COMMAND ${CMAKE_AR} rc libcombined.a $ $ FILE:lib2>) > Quick & dirty :-) There is the "thin" option of ar as well:

Re: [CMake] creating a library from other one

2018-08-31 Thread Stéphane Ancelot
I ended with : add_custom_target(combined ALL    COMMAND ${CMAKE_AR} rc libcombined.a $ $) Le 31/08/2018 à 15:24, Eric Noulard a écrit : First create OBJECT libraries instead of static Then create as many STATIC libraries as you want that includes as many OBJECT libraries content as you

Re: [CMake] creating a library from other one

2018-08-31 Thread Eric Noulard
First create OBJECT libraries instead of static Then create as many STATIC libraries as you want that includes as many OBJECT libraries content as you want. Le ven. 31 août 2018 à 15:17, Stéphane Ancelot a écrit : > Hi, > > I have got some static libraries generated, that I would like to put

[CMake] creating a library from other one

2018-08-31 Thread Stéphane Ancelot
Hi, I have got some static libraries generated, that  I would like to put in a common one. how can I proceed ? Regards, S.Ancelot -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services

Re: [CMake] Creating a library from subdirectories

2014-11-28 Thread Chris Johnson
Thanks to all who have replied for your efforts in trying to help me. My apologies for any lack of clarity in describing my problem. With the various information and advice you provided, I have been able to get my CMake configuration working. Thanks again! ..chris On Wed, Nov 26, 2014 at

Re: [CMake] Creating a library from subdirectories

2014-11-26 Thread Mueller-Roemer, Johannes Sebastian
, 2014 01:36 To: cmake@cmake.org Subject: [CMake] Creating a library from subdirectories This CMake wiki page (http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library) claims one can create a library from subdirectories containing libraries, which is exactly what I want to do. However, it doesn't

Re: [CMake] Creating a library from subdirectories

2014-11-26 Thread Mueller-Roemer, Johannes Sebastian
-Roemer, Johannes Sebastian Sent: Wednesday, November 26, 2014 13:50 To: 'Chris Johnson'; cmake@cmake.org Subject: RE: [CMake] Creating a library from subdirectories In the example on that site an OBJECT library is created (the output consists of multiple .obj files), you used STATIC libraries instead

Re: [CMake] Creating a library from subdirectories

2014-11-26 Thread Chris Johnson
, Johannes Sebastian *Sent:* Wednesday, November 26, 2014 13:50 *To:* 'Chris Johnson'; cmake@cmake.org *Subject:* RE: [CMake] Creating a library from subdirectories In the example on that site an OBJECT library is created (the output consists of multiple .obj files), you used STATIC libraries

Re: [CMake] Creating a library from subdirectories

2014-11-26 Thread Mueller-Roemer, Johannes Sebastian
that CMake knows that those have to be linked as well. From: Chris Johnson [cxjohn...@gmail.com] Sent: Wednesday, November 26, 2014 8:45 PM To: Mueller-Roemer, Johannes Sebastian Cc: cmake@cmake.org Subject: Re: [CMake] Creating a library from subdirectories I

Re: [CMake] Creating a library from subdirectories

2014-11-26 Thread J Decker
, November 26, 2014 8:45 PM To: Mueller-Roemer, Johannes Sebastian Cc: cmake@cmake.org Subject: Re: [CMake] Creating a library from subdirectories I know that one cannot link static libraries together; they're just archives of objects, really. But since CMake abstracts the actual construction

Re: [CMake] Creating a library from subdirectories

2014-11-26 Thread Stephen Kelly
Chris Johnson wrote: * I do not want to use the add_library(component1 OBJECT ${component1_sources}) and add_library(toplevel $TARGET_OBJECTS:component1 ... ) syntax if it can be avoided. Is the constraint that you want a top-level something like # All components: set(components

[CMake] Creating a library from subdirectories

2014-11-25 Thread Chris Johnson
This CMake wiki page ( http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library) claims one can create a library from subdirectories containing libraries, which is exactly what I want to do. However, it doesn't seem to work. Here's my SSCCE ( http://sscce.org) toy example file structure: . |--

Re: [CMake] creating a library -- folder layout??

2011-09-14 Thread Cristobal Navarro
thanks Eric! Cristobal On Tue, Sep 13, 2011 at 7:12 PM, Eric Noulard eric.noul...@gmail.comwrote: 2011/9/13 Cristobal Navarro axisch...@gmail.com: hello everyone! this is my first post on the mailing list i am making a shared library i have everything configured properly so that cmake

[CMake] creating a library -- folder layout??

2011-09-13 Thread Cristobal Navarro
hello everyone! this is my first post on the mailing list i am making a shared library i have everything configured properly so that cmake creates de makefile scripts as espected at the moment cmake is installing my library by default into: /usr/local/lib/mylib.so.0.1 (and the symlink mylib.so)

Re: [CMake] creating a library -- folder layout??

2011-09-13 Thread Eric Noulard
2011/9/13 Cristobal Navarro axisch...@gmail.com: hello everyone! this is my first post on the mailing list i am making a shared library i have everything configured properly so that cmake creates de makefile scripts as espected at the moment cmake is installing my library by default into:

[CMake] Creating a library

2009-02-18 Thread David Doria
If I have many executables in the same project (ie same CMakeLists.txt file), it seems like I shouldn't have to do this: set(Sources File1.cpp File1.cpp ) ADD_EXECUTABLE(Test1 Test1.cpp ${Sources}) ADD_EXECUTABLE(Test2 Test2.cpp ${Sources}) because it is compiling File1 and File2 twice when

Re: [CMake] Creating a library

2009-02-18 Thread Christopher Harvey
Off the top of my head I think TARGET_LINK_LIBRARIES(Test1 ${MyLibs}) should be TARGET_LINK_LIBRARIES(Test1 MyLibs) Also, I think you need to specify a static library if you want one. It seems like a static library is what you want in this case. I wrote this up really quick, and could be wrong

Re: [CMake] Creating a library

2009-02-18 Thread Bill Hoffman
David Doria wrote: If I have many executables in the same project (ie same CMakeLists.txt file), it seems like I shouldn't have to do this: set(Sources File1.cpp File1.cpp ) ADD_EXECUTABLE(Test1 Test1.cpp ${Sources}) ADD_EXECUTABLE(Test2 Test2.cpp ${Sources}) because it is compiling File1

Re: [CMake] Creating a library

2009-02-18 Thread David Doria
Ah of course! I am just used to doing ADD_EXECUTABLE(Test1 Test1.cpp ${Sources}) So I guess I wasn't thinking and assumed it would be the same for libraries, but now MyLibs is an actual thing, not a list of files like ${Sources} is. Thanks guys. David On Wed, Feb 18, 2009 at 12:46 PM, Bill

Re: [CMake] creating static library with references to other .lib files

2007-06-18 Thread Jesper Eskilson
2007/6/14, David Cole [EMAIL PROTECTED]: It's advanced CMake use, but you might want to have a look at overriding the CMake rule variable CMAKE_CXX_CREATE_STATIC_LIBRARY. (Or _C_ if it's C source code.) You should be able to add some linker flags in there, although they may apply to all static

Re: [CMake] creating static library with references to other .lib files

2007-06-15 Thread Jesper Eskilson
2007/6/15, kitts [EMAIL PROTECTED]: On Thursday 14 Jun 2007 12:23:07 pm Jesper Eskilson wrote: Is it really impossible to pass an option to the linker when creating a static library? I have not gone through the whole thread but i think the function SET_TARGET_PROPERTIES(TARGET LINK_FLAGS

Re: [CMake] creating static library with references to other .lib files

2007-06-15 Thread kitts
On Thursday 14 Jun 2007 12:23:07 pm Jesper Eskilson wrote: Is it really impossible to pass an option to the linker when creating a static library? I have not gone through the whole thread but i think the function SET_TARGET_PROPERTIES(TARGET LINK_FLAGS XYZ) can do it. The problem i foresee

Re: [CMake] creating static library with references to other .lib files

2007-06-14 Thread Jesper Eskilson
2007/6/14, Brandon Van Every [EMAIL PROTECTED]: On 6/13/07, Jesper Eskilson [EMAIL PROTECTED] wrote: 2007/6/13, Brandon Van Every [EMAIL PROTECTED]: But why don't you just ship your users a dynamic lib? As far as I know, there are no restrictions on dynamic libs including static libs.

Re: [CMake] creating static library with references to other .lib files

2007-06-14 Thread David Cole
It's advanced CMake use, but you might want to have a look at overriding the CMake rule variable CMAKE_CXX_CREATE_STATIC_LIBRARY. (Or _C_ if it's C source code.) You should be able to add some linker flags in there, although they may apply to all static libraries built in the whole project. I'm

Re: [CMake] creating static library with references to other .lib files

2007-06-14 Thread Brandon Van Every
On 6/14/07, Jesper Eskilson [EMAIL PROTECTED] wrote: Is it really impossible to pass an option to the linker when creating a static library? It's not terribly difficult. But I thought I'd save you the learning curve if it wasn't necessary. Cheers, Brandon Van Every

Re: [CMake] creating static library with references to other .lib files

2007-06-13 Thread Brandon Van Every
On 6/12/07, Jesper Eskilson [EMAIL PROTECTED] wrote: 2007/6/12, Brandon Van Every [EMAIL PROTECTED]: I don't know what the MSVC linker can accomplish. Would suggest reading the MSVC docs to make sure it can be done. I *know* that it can be done, since our current hand-written .vcproj files

Fwd: [CMake] creating static library with references to other .lib files

2007-06-13 Thread Jesper Eskilson
Forgot to cc the list. -- Forwarded message -- From: Jesper Eskilson [EMAIL PROTECTED] Date: 2007-jun-13 19:56 Subject: Re: [CMake] creating static library with references to other .lib files To: Brandon Van Every [EMAIL PROTECTED] 2007/6/13, Brandon Van Every [EMAIL PROTECTED

Re: [CMake] creating static library with references to other .lib files

2007-06-13 Thread Keith T. Garner
On 6/12/07 5:36 PM, Jesper Eskilson wrote: What you're asking for seems kinda weird. What's the motive? foo.obj and bar.obj uses symbols in mydll.dll, and I want to allow users of mystatic.lib to just have to link with mystaticlib.lib, and not with mydll.lib. Note that an import

Re: [CMake] creating static library with references to other .lib files

2007-06-13 Thread Brandon Van Every
On 6/13/07, Jesper Eskilson [EMAIL PROTECTED] wrote: 2007/6/13, Brandon Van Every [EMAIL PROTECTED]: But why don't you just ship your users a dynamic lib? As far as I know, there are no restrictions on dynamic libs including static libs. That is an alternative, but it requires a non-trivial

Re: [CMake] creating static library with references to other .lib files

2007-06-12 Thread Jesper Eskilson
2007/6/7, Jesper Eskilson [EMAIL PROTECTED]: 2007/6/7, Brandon Van Every [EMAIL PROTECTED]: On 6/7/07, Jesper Eskilson [EMAIL PROTECTED] wrote: Hi all, I would like to be able to create a static library on Windows which includes an import library to a DLL, so that users of the

Re: [CMake] creating static library with references to other .lib files

2007-06-12 Thread Brandon Van Every
On 6/12/07, Jesper Eskilson [EMAIL PROTECTED] wrote: 2007/6/7, Jesper Eskilson [EMAIL PROTECTED]: 2007/6/7, Brandon Van Every [EMAIL PROTECTED]: On 6/7/07, Jesper Eskilson [EMAIL PROTECTED] wrote: Hi all, I would like to be able to create a static library on Windows which

Re: [CMake] creating static library with references to other .lib files

2007-06-12 Thread Jesper Eskilson
2007/6/12, Brandon Van Every [EMAIL PROTECTED]: On some platforms, I bet the underlying linker AR can't even do it. I know it can't put static libraries inside of static libraries, thats' why everyone wants convenience libraries and I had to work on all that object file fakery. Possibly it

[CMake] creating static library with references to other .lib files

2007-06-07 Thread Jesper Eskilson
Hi all, I would like to be able to create a static library on Windows which includes an import library to a DLL, so that users of the static library do not need to specify the import library. CMake does not allow me to do this. TARGET_LINK_LIBRARIES( FooLib BarLib ) does not work when

Re: [CMake] creating static library with references to other .lib files

2007-06-07 Thread Brandon Van Every
On 6/7/07, Jesper Eskilson [EMAIL PROTECTED] wrote: Hi all, I would like to be able to create a static library on Windows which includes an import library to a DLL, so that users of the static library do not need to specify the import library. By chance, is your library a C library that is

Re: [CMake] creating static library with references to other .lib files

2007-06-07 Thread Jesper Eskilson
2007/6/7, Brandon Van Every [EMAIL PROTECTED]: On 6/7/07, Jesper Eskilson [EMAIL PROTECTED] wrote: Hi all, I would like to be able to create a static library on Windows which includes an import library to a DLL, so that users of the static library do not need to specify the import library.