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

fixed for out-of-source build #344

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fixed for out-of-source build #344

wants to merge 2 commits into from

Conversation

malytomas
Copy link

No description provided.

@@ -230,6 +230,7 @@ endif()
# Example binaries
#============================================================================

if(NOT SKIP_EXAMPLES)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be SKIP_ZLIB_EXAMPLES, perhaps?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing the include above to be:
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})

results in the examples compiling, so perhaps you don't need to exclude them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing the include directories seems better, indeed :D

@@ -74,7 +74,7 @@ if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
message(STATUS " ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h")
message(STATUS "to 'zconf.h.included' because this file is included with zlib")
message(STATUS "but CMake generates it automatically in the build directory.")
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_BINARY_DIR}/zconf.h.included COPYONLY)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #133 might be related to this.

Tbh, I remember this had something to do with CMAKE_DISABLE_SOURCE_CHANGES, but it seems to work now.

@stkruse
Copy link

stkruse commented Feb 27, 2019

Is there a reason that the pull request isn't accepted until now?

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.

3 participants