Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling error: zlib.h: No such file or directory #19

Open
orionzhou opened this issue Oct 13, 2011 · 3 comments
Open

compiling error: zlib.h: No such file or directory #19

orionzhou opened this issue Oct 13, 2011 · 3 comments

Comments

@orionzhou
Copy link

I am getting this error:

[ 4%] Building CXX object src/api/CMakeFiles/BamTools.dir/internal/BgzfStream_p.cpp.o
/project/youngn/zhoup/Source/bamtools/src/api/internal/BgzfStream_p.cpp:20:18: error: zlib.h: No such file or directory

What can I do to tell cmake to look for zlib.h in my custom library (e.g., /usr/local/include) ? thanks a lot!

@pezmaster31
Copy link
Owner

Try something with this: http://cmake.org/cmake/help/cmake-2-8-docs.html#command:include_directories in your bamtools/src/api/CMakeLists.txt file.

include_directories( /your/custom/dir )

Let me know if that does the trick or not.

@orionzhou
Copy link
Author

Thanks - that works. I have another question, if I want to install bamtools to a directory (e.g., $prefix), by doing:

cmake .. -DCMAKE_INSTALL_PREFIX=$prefix
make
make install

It will generate directory layout like this:

$prefix
--bin
--include
----bamtools
------.h
--lib
----bamtools
------
.so

This works if I want to install bamtools to /usr/local, but doesn't work if I don't want to mix it up with other libraries and want to generate layout like this:

$prefix
--bin
--include
----.h
--lib
----
.so

Is there anything I could tell cmake to do rather than manually move the files?

Thanks,

@pezmaster31
Copy link
Owner

Unfortunately, I really don't know. I never dove into all the
intricacies of the install side of CMake, just the build side.

Between the CMake docs & Google, you might be able to figure out
something along the lines of what you're looking for. I'd love to try
and help more, but am swamped with some critical fixes on my end right now.

Sorry I can't be of much help at the moment.

  • Derek

On 10/13/2011 09:44 PM, orionzhou wrote:

Thanks - that works. I have another question, if I want to install bamtools to a directory (e.g., $prefix), by doing:

cmake .. -DCMAKE_INSTALL_PREFIX=$prefix
make
make install

It will generate directory layout like this:

$prefix
--bin
--include
----bamtools
------.h
--lib
----bamtools
------
.so

This works if I want to install bamtools to /usr/local, but doesn't work if I don't want to mix it up with other libraries and want to generate layout like this:

$prefix
--bin
--include
----.h
--lib
----
.so

Is there anything I could tell cmake to do rather than manually move the files?

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants