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

Require bzip2 on *nix #89

Merged
merged 1 commit into from
Oct 15, 2016
Merged

Conversation

cen1
Copy link
Contributor

@cen1 cen1 commented Oct 14, 2016

If you run CMake and then build on *nix without having bzip2-devel installed, build will fail with linker error for -lbz2. This is due to the fact that ZLIB_BZIP2_FILES is added to compile target for WIN32 only. So, bzip2 is compiled from source on Windows but not for *nix. This change fails the CMake build if bzip2 is missing.

…inker errors when building. This is due to bzip2 being compiled from source for WIN32 only.
@cen1
Copy link
Contributor Author

cen1 commented Oct 14, 2016

CMake output with this commit:

-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6")

If bzip2-devel is missing:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find BZip2 (missing: BZIP2_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindBZip2.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:266 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/cen/git/StormLib/build/CMakeFiles/CMakeOutput.log".

@ladislav-zezula ladislav-zezula merged commit 0d77ab2 into ladislav-zezula:master Oct 15, 2016
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

Successfully merging this pull request may close these issues.

2 participants