[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: need help with Linux shared objects
- From: Peter Drahoš <drahosp@...>
- Date: Mon, 21 Mar 2011 21:19:23 +0100
On Mon, Mar 21, 2011 at 8:38 PM, Gaspard Bucher <email@example.com>
Am I really the only one who has encountered this issue when creating Lua modules ?
I have looked at your build, I find the organization rather chaotic (macros calling macros in subdirs) etc. The only issue that cough my eye was that you seem to be using LIBRARY_OUTPUT_DIRECTORY in the build_sub_module macro to deploy the modules. This directory should be inside the CMAKE_CURRENT_BINARY_DIR as it stores the objects used to create the module. The CMake manual recommends using INSTALL commands to deploy modules to destination instead. I encountered similar issue when building luasocket in LuaDist that has two 'core' objects, one for mime the other for socket. The same name caused the build to misbehave in similar way you are experiencing. The solution was to use per target LIBRARY_OUTPUT_DIRECTORY, note this is relative path in CMAKE_CURRENT_BINARY_DIR.
Sorry for rather boring CMake related stuff on the list.
PS: You seem to be abusing CMake to a degree that its not portable. Why use CMake then?
PSS: Check out our install_lua_module macro in dist.cmake for inspiration.