Hello,
I build a project which consists of several "modules" with various mutual
dependencies. Each module defines its OBJECT target as:
# Module 1:
add_library(Module1 OBJECT )
target_include_directories(Module1 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
add_library(Module1_LI
Hallo,
I have created a simple project simulating the issue.
There is 'run.sh' script which first builds an executable using
'add_subdirectory()' CMake command. It works without issues, as expected (the
libraries required by Module1 and Module2 are passed to the Module4 builder).
Then, it fir
Hallo Robert,
thank you for your answer.
While I generally understand your explanation, I do not know exactly what to
do. I have tried to add
target_link_libraries(Module2_LIBRARIES INTERFACE $)
into Modules 1 and 2 together with
install(EXPORT ...
in Module 3, but still there is
Hallo,
thank you for your reply. I have tried to set the COMPONENT in the INSTALL()
command, but it did not lead to the expected result. The install command
I changed to (ONLY for the target I want to install, inspired by
http://www.cmake.org/pipermail/cmake/2006-October/011362.html):
INSTALL(TA
Thank you! I have overlooked the -D. I am sorry for this useless message
...
- PŮVODNÍ ZPRÁVA -
Od: "Tyler Roscoe"
Komu: roze...@volny.cz
Předmět: Re: [CMake] Conditional install
Datum: 11.8.2009 - 23:45:06
> On Tue, Aug 11, 2009 at 11:37:54PM +0200, roze...@volny.cz
> wrote:
> > >$ cmak
Hallo, thank you very much.
Of course, the correct sequence (alternative to 'make install') is
cmake OPTIONS path_to_CMakeLists_dir
make
cmake -D COMPONENT=dist -P cmake_install.cmake path_to_CMakeLists_dir
Now it is working for the installation.
Also thank you for the links, they are very useful
Hallo everybody.
I would like to ask you, if (and how, if so) it is possible to set CMake
to strip (/usr/bin/strip) the generated libraries. Let me note that
build works without problems.
I made the following definition (LIB_NAME is item defined by me):
ADD_CUSTOM_COMMAND(TARGET ${LIB_NAME}
POST
Uh, so simple. Thank you, I didn't know about this option (probably not
read gcc manpage carefully). Thank you again.
Dan
>
> > I would like to ask you, if (and how, if so) it is
> > possible
> > > to set CMake
> > to strip (/usr/bin/strip) the generated libraries.
> >
> Use -s option for gcc.
Dear all,
I would like to ask, if CMake supports something like "conditional"
installation.
My CMakeLists.txt includes the following:
# The source files of the application (binary)
add_directory(src)
# The subdirectories with the required libraries. They are included
# through svn:externals
# T
Hallo.I try to use get_prerequisites() and it seems that it is called before the target is created. The CMake code snipped is as follows:
set(SRC_FILES )# Make libadd_library( OUTPUT SHARED ${SRCS_FILES})target_link_libraries(OUTPUT
${PROJECT_LIBRARIES})target_lin
When get_prerequisites() is not called, the build works correctly. So, did I do
anything wrong?
get_prerequisites needs to be called at install time and not CMake time.
Look at install(CODE "")
-Bill
Hello Bill,thank you for your answer. I guessed that this is the problem, but I didn't know
Sorry po re-posting, the formatting in the previous message was badly corupted
... :-(
__ Původní zpráva:
Od:
Komu:
Datum: 07.01.2016 10:25
Předmět: Re: [CMake]get_prerequisites() - fails with No such file or directory
When get_prerequisites() i
12 matches
Mail list logo