-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
base: master
Are you sure you want to change the base?
Conversation
@@ -230,6 +230,7 @@ endif() | |||
# Example binaries | |||
#============================================================================ | |||
|
|||
if(NOT SKIP_EXAMPLES) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
Is there a reason that the pull request isn't accepted until now? |
No description provided.