Use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR. Requested by Tomáš Malý. Closes #211.
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index a81367e..9fc4869 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt
@@ -111,7 +111,7 @@ zip_unchange_archive.c zip_unchange_data.c zip_utf-8.c - ${CMAKE_BINARY_DIR}/zip_err_str.c + ${CMAKE_CURRENT_BINARY_DIR}/zip_err_str.c ) add_library(libzip::zip ALIAS zip) @@ -225,4 +225,4 @@ const int _zip_err_type[] = { ]=]) string(APPEND zip_err_str "${zip_err_type}}\;\n") -file(WRITE ${CMAKE_BINARY_DIR}/zip_err_str.c ${zip_err_str}) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/zip_err_str.c ${zip_err_str})