allan-simon / cppcms-skeleton

web framework in C++ built over cppcms
Other
25 stars 12 forks source link

problem with installing to /usr/local #31

Open eventhorizonpl opened 11 years ago

eventhorizonpl commented 11 years ago

Hi,

If I install cppcmsskel to /usr/local I get this

app/galaxy: error while loading shared libraries: libcppcmsskel.so: cannot open shared object file: No such file or directory

I think that the possible workaround for this will be adding file to /etc/ld.so.conf.d/ with path to libcppcmsskel.so.

But I don't know if this is the right solution.

If I install to /usr instead of /usr/local libcppcmsskel.so can be loaded, but init.py uses /usr/local by default.

If you think that cppcmsskel should be always installed to /usr/local, I can fix my system configuration. If you think that framework might be installed to any path, I can try to fix issues with that and send you a patch.

allan-simon commented 11 years ago

I think the framework should be able to be installed anywhere, but I admit to not be very familiar with this kind of problem, so if you could submit a patch, sure that will be great, thank you.

allan-simon commented 11 years ago

for this I'm wondering if the "generic" solution wouldn't to have like with the autotools, a --prefix option and to get its value after in the CMake ?

eventhorizonpl commented 11 years ago

I use this command to install to /usr cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr

I don't know how to get this value from CMAKE. Do you have a code snippet for this?

dwaldhalm commented 10 years ago

make fails because it can't find libcppcmsskel.so.0. To get a build, I altered the generated CMakeLists.txt file so that it finds the file in the "Dependency check" section and sets a variable. Given the unaltered example scripts (including config.py), the resulting CMakeLists.txt file required changes two changes: ln 25: "cppcmsskel" -> "find_library(CPPCMSSKEL cppcmsskel)" ln 100: "cppcmskel" -> "${CPPCMSSKEL}"

allan-simon commented 10 years ago

@dwaldhalm great, i'm currently in vacation so i access github with my phone (and that's why i've been quite long to reply to you) , as I've not access to my computer, would you feel like making a Pull request ?