Fix path to getopt.c in previous.
Fix older typo.
diff --git a/regress/CMakeLists.txt b/regress/CMakeLists.txt
index cdb38c8..d0bb9c6 100644
--- a/regress/CMakeLists.txt
+++ b/regress/CMakeLists.txt
@@ -41,7 +41,7 @@
add_executable(${PROGRAM} ${PROGRAM}.c)
target_link_libraries(${PROGRAM} zip)
if(NOT HAVE_GETOPT)
- target_sources(${PROGRAM} PRIVATE getopt.c)
+ target_sources(${PROGRAM} PRIVATE ../src/getopt.c)
endif(NOT HAVE_GETOPT)
endforeach()
@@ -51,11 +51,11 @@
endforeach()
# hole needs getopt() too.
if(NOT HAVE_GETOPT)
- target_sources(hole PRIVATE getopt.c)
+ target_sources(hole PRIVATE ../src/getopt.c)
endif(NOT HAVE_GETOPT)
foreach(PROGRAM IN LISTS ALL_PROGRAMS)
- include_directories(${PROGRAM} PRIVATE BEFORE ${PROJECT_SOURCE_DIR}/lib ${PROJECT_SOURCE_DIR}/src ${PROJECT_BINARY_DIR})
+ target_include_directories(${PROGRAM} PRIVATE BEFORE ${PROJECT_SOURCE_DIR}/lib ${PROJECT_SOURCE_DIR}/src ${PROJECT_BINARY_DIR})
endforeach()
add_custom_target(cleanup
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c8394a4..85ce0e6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,7 +2,7 @@
foreach(PROGRAM zipcmp zipmerge ziptool)
add_executable(${PROGRAM} ${PROGRAM}.c)
target_link_libraries(${PROGRAM} zip)
- target_include_directories(${PROGRAM} BEFORE PRIVATE ${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR})
+ target_include_directories(${PROGRAM} PRIVATE BEFORE ${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR})
if(LIBZIP_DO_INSTALL)
install(TARGETS ${PROGRAM} EXPORT ${PROJECT_NAME}-targets RUNTIME DESTINATION bin)
endif()