Skip to content

fixed for out-of-source build#344

Closed
malytomas wants to merge 2 commits intomadler:masterfrom
ucpu:master
Closed

fixed for out-of-source build#344
malytomas wants to merge 2 commits intomadler:masterfrom
ucpu:master

Conversation

@malytomas
Copy link
Copy Markdown

No description provided.

# Example binaries
#============================================================================

if(NOT SKIP_EXAMPLES)
Copy link
Copy Markdown

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?

Copy link
Copy Markdown

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
Copy Markdown
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

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
Copy Markdown
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
Copy Markdown

stkruse commented Feb 27, 2019

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

@madler
Copy link
Copy Markdown
Owner

madler commented Feb 2, 2025

See #1027 .

@madler madler closed this Feb 2, 2025
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.

4 participants