[opensuse-packaging] Need cmake help for openCOLLADA
I've a problem with my cmake openCOLLADA build when using multiple jobs, one lib wants to link to another that hasn't finished building/linking yet. Being a hacker at heart I'm trying to add this to the CMakeLists.txt of the lib that can't find the other : find_package(lib/libOpenCOLLADABaseUtils) WHILE(libOpenCOLLADABaseUtils_FOUND) I'm still going over commands and syntax, I don't know how to invert "libOpenCOLLADABaseUtils_FOUND" yet or if this method will even work. openCOLLADA takes a long time to build and if I build it on my system one of the libs hogs my system to the point of it freezing for at least 20 minutes, so I can only do this and go away for a while and come back to find that it's failed. Doesn't fair well with hacking. Please help. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 04/30/2011 01:38 PM, Dave Plater wrote:
I've a problem with my cmake openCOLLADA build when using multiple jobs, one lib wants to link to another that hasn't finished building/linking yet. Being a hacker at heart I'm trying to add this to the CMakeLists.txt of the lib that can't find the other :
find_package(lib/libOpenCOLLADABaseUtils) WHILE(libOpenCOLLADABaseUtils_FOUND)
I'm still going over commands and syntax, I don't know how to invert "libOpenCOLLADABaseUtils_FOUND" yet or if this method will even work. openCOLLADA takes a long time to build and if I build it on my system one of the libs hogs my system to the point of it freezing for at least 20 minutes, so I can only do this and go away for a while and come back to find that it's failed. Doesn't fair well with hacking.
Please help. Thanks Dave P
Ok I've got as far as this, hope it works : # GeneratedSaxParser fails to find OpenCOLLADABaseUtils for linking during multiple job builds # this is an attempt to make GeneratedSaxParser's linking wait for libOpenCOLLADABaseUtils to finish first. find_package(lib/libOpenCOLLADABaseUtils) WHILE(libOpenCOLLADABaseUtils_NOTFOUND) find_package(lib/libOpenCOLLADABaseUtils) ENDWHILE(libOpenCOLLADABaseUtils_FOUND is FALSE) Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
2011/4/30 Dave Plater <davejplater@gmail.com>:
I've a problem with my cmake openCOLLADA build when using multiple jobs, one lib wants to link to another that hasn't finished building/linking yet. Being a hacker at heart I'm trying to add this to the CMakeLists.txt of the lib that can't find the other :
find_package(lib/libOpenCOLLADABaseUtils) WHILE(libOpenCOLLADABaseUtils_FOUND)
I'm still going over commands and syntax, I don't know how to invert "libOpenCOLLADABaseUtils_FOUND" yet or if this method will even work. openCOLLADA takes a long time to build and if I build it on my system one of the libs hogs my system to the point of it freezing for at least 20 minutes, so I can only do this and go away for a while and come back to find that it's failed. Doesn't fair well with hacking.
I'm not a cmake expert, but a "cmake target dependencies" in Google probably will give you all the info you need. cmake --help-command add_dependencies seems to be the solution. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 04/30/2011 03:40 PM, Cristian Morales Vega wrote:
I'm not a cmake expert, but a "cmake target dependencies" in Google probably will give you all the info you need.
cmake --help-command add_dependencies seems to be the solution.
Looks good to me, thanks for saving me time. I've got the cmake documentation open in browser. Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 04/30/2011 03:40 PM, Cristian Morales Vega wrote: > I'm not a cmake expert, but a "cmake target dependencies" in Google > probably will give you all the info you need. > > cmake --help-command add_dependencies seems to be the solution. Thanks once again, after finding the right place to put it : ADD_LIBRARY(${name}_shared SHARED ${libGeneratedSaxParser_src_files}) - SET_TARGET_PROPERTIES(${name}_shared PROPERTIES OUTPUT_NAME ${name}) + SET_TARGET_PROPERTIES(${name}_shared PROPERTIES OUTPUT_NAME ${name} SOVERSION ${soversion}.${soage}.${sorevision}) TARGET_LINK_LIBRARIES(${name}_shared ${libGeneratedSaxParser_libs}) SET(CMAKE_REQUIRED_LIBRARIES "${name}_shared;${CMAKE_REQUIRED_LIBRARIES}" PARENT_SCOPE) + add_dependencies(${name}_shared;${CMAKE_REQUIRED_LIBRARIES}) Still got the so version to fix but multiple jobs build is fixed. Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (2)
-
Cristian Morales Vega
-
Dave Plater