I am compiling a C++ Program.
When I compile it on my machine the program runs just fine.
When I zip the whole build and send it over to friend he gets the following error:
error while loading shared libraries: libCommon.so: cannot open shared object file: No such file or directory
Somehow I believe that the shared library is not properly linked.
Here is my main CMakeLists.txt:
cmake_minimum_required(VERSION 3.16)
project(Vibranium_Core)
#set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 17)
set(FLATBUFFERS_MAX_PARSING_DEPTH 16)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_INSTALL_RPATH "$ORIGIN")
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
if(APPLE)
set(OPENSSL_INCLUDE_DIR "/opt/homebrew/opt/openssl#1.1/include")
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(
COMMAND git rev-list --count HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND git --no-pager log -1 --format=%ai
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_RELEASED_ON
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else(EXISTS "${CMAKE_SOURCE_DIR}/.git")
set(GIT_BRANCH "")
set(GIT_COMMIT_HASH "")
endif(EXISTS "${CMAKE_SOURCE_DIR}/.git")
message(STATUS "VibraniumCore current branch: ${GIT_BRANCH}")
message(STATUS "VibraniumCore Version: ${GIT_VERSION}")
message(STATUS "VibraniumCore commit hash: ${GIT_COMMIT_HASH}")
message(STATUS "Released on: ${GIT_RELEASED_ON}")
message(STATUS "Generating version.h")
configure_file(
${CMAKE_SOURCE_DIR}/cmake/version.h.in
${CMAKE_SOURCE_DIR}/Source/Common/Version.h
)
add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}")
add_definitions(-DGIT_BRANCH="${GIT_BRANCH}")
add_definitions(-DGIT_VERSION="${GIT_VERSION}")
add_definitions(-DGIT_RELEASED_ON="${GIT_RELEASED_ON}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
message(STATUS "Target is 64 bits")
if (WIN32)
set(WINXXBITS Win64)
endif(WIN32)
else("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
message(STATUS "Target is 32 bits")
if (WIN32)
set(WINXXBITS Win32)
endif(WIN32)
endif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
# set macro-directory
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/cmake/macros")
find_package(CURL REQUIRED)
find_package(MySQL REQUIRED)
find_package(Flatbuffers REQUIRED
PATHS /usr/local/flatbuffers)
find_package(Protobuf REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(gRPC CONFIG REQUIRED)
include_directories(${MYSQL_INCLUDE_DIR})
if(APPLE)
include_directories(/opt/homebrew/include)
include_directories(/usr/local/include)
endif()
# set default buildoptions and print them
include(cmake/options.cmake)
# Find revision ID and hash of the sourcetree
include(cmake/genrev.cmake)
# print out the results before continuing
include(cmake/showoptions.cmake)
# add dependencies
add_subdirectory(dep)
# add libraries and projects
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Source/Common)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Source/WorldServer)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Source/AuthServer)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Source/ClientEmulator)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Source/GameServerClientEmulator)
add_subdirectory(Tests)
set_target_properties(VibraniumCoreTests PROPERTIES EXCLUDE_FROM_ALL TRUE)
set_target_properties(gtest PROPERTIES EXCLUDE_FROM_ALL TRUE)
set_target_properties(gmock PROPERTIES EXCLUDE_FROM_ALL TRUE)
set_target_properties(gtest_main PROPERTIES EXCLUDE_FROM_ALL TRUE)
set_target_properties(gmock_main PROPERTIES EXCLUDE_FROM_ALL TRUE)
set_target_properties(
Common WorldServer AuthServer ClientEmulator
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
Any idea why I get this error and how can I fix it?
Given the project structure
src
MyModule.cpp
test
TestMyModule.cpp
How does one import MyModule in TestMyModule.cpp?
Edit: apparently a environment issue is making me unable to import it
My CMakeList.txt:
cmake_minimum_required (VERSION 3.8)
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET FocusApp PROPERTY CXX_STANDARD 20)
endif()
project ("App")
enable_testing()
add_executable (App "src/EntryPoint.ixx" "src/Time.ixx" )
add_executable(TestTime "src/Time.ixx" "test/TestTime.ixx" )
if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR MYPROJECT_BUILD_TESTING) AND BUILD_TESTING)
add_subdirectory(test)
endif()
add_test("testerino" TestTime.exe)
I have difficulties with CMakeLists file. I have done pretty much the same in my other project, so i know the paths are correct. But i tried to make it a bit more pretty so I created a new CMakeLists file.
Now my project fails to find the headers.
Anyone see what I have missed?
Here is my CMakeLists file:
project("Test Cell Camera")
set(VERSION_MAJOR 0)
set(VERSION_MINOR 1)
set(VERSION_PATCH 0)
set(CMAKE_CXX_STANDARD 17)
set(lib_TARGET tcc)
set(exec_TARGET tcc_exe)
set(test_TARGET tcc_test)
set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests")
set(LIBS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libs")
set(CONFIG_DIR "${CMAKE_CURRENT_SOURCE_DIR}/config")
set(main_SRC_FILE "${SRC_DIR}/main.cpp")
include_directories(
${SRC_DIR}
${INCLUDE_DIR}
"C:/Program Files/Basler/pylon 5/Development/include" # Basler
)
file(GLOB lib_INCLUDE "${INCLUDE_DIR}/*/*.h")
file(GLOB lib_SRC "${SRC_DIR}/*.cpp")
list(FILTER lib_SRC EXCLUDE REGEX ${main_SRC_FILE})
file(GLOB main_SRC ${main_SRC_FILE})
# Add all test sources
file(GLOB test_SRC "${TESTS_DIR}/*.cpp")
# Documentation doxifile path
set(lib_DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc/")
link_directories("C:/Program Files/Basler/pylon 5/Development/lib/x64")
set(OpenCV_DIR "C:/OpenCV/3.4.7")
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
set(lib_dep_LIBS PylonC.lib ${OpenCV_LIBS})
add_library(${lib_TARGET} ${lib_SRC})
target_link_libraries(${lib_TARGET} ${lib_dep_LIBS})```
I want to build my project in catkin workspace. After executing catkin_make i got these errors:
6:11: error: ‘vector’ is not a member of ‘cv’
cv::vector<cv::Point> points;
6:31: error: expected primary-expression before ‘>’ token
cv::vector<cv::Point> points;
9:77: error: no matching function for call to ‘std::vector<Eigen::Matrix<double, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 1> > >::push_back(cv::Point)’
/catkin_ws/src/rgbd_calibration/src/rgbd_calibration/calibration_test.cpp:1123:113: error: no matching function for call to ‘fillConvexPoly(cv::Mat&, std::vector<Eigen::Matrix<double, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 1> > >&, cv::Scalar)’
cv::fillConvexPoly(tmp_image, points, cv::Scalar(c == 0 ? 128 : 0, c == 1 ? 128 : 0, c == 2 ? 128 : 0));
^
In file included from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/imgproc/imgproc.hpp:48:0,
from /opt/ros/kinetic/include/image_geometry/pinhole_camera_model.h:6,
I have build opencv 3.3.0, and also it finds `/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/imgproc/imgproc.hpp:48:0,
I suspect that somthing has to do with opencv library but cant find out. Its my first try with ROS so any help would be welcomed
Makefile below:
cmake_minimum_required(VERSION 2.8.3)
project(rgbd_calibration)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS cmake_modules roscpp calibration_common geometry_msgs kinect
eigen_conversions camera_info_manager cv_bridge pcl_ros
image_transport)# swissranger_camera)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(Boost REQUIRED)
find_package(Eigen REQUIRED)
find_package(PCL 1.7 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(OpenMP REQUIRED)
find_package(Ceres REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
## Uncomment this if the package has a setup.py. This macro ensures
## modules and scripts declared therein get installed
# catkin_python_setup()
#######################################
## Declare ROS messages and services ##
#######################################
## Generate messages in the 'msg' folder
add_message_files(
FILES
Acquisition.msg
)
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
###################################################
## Declare things to be passed to other projects ##
###################################################
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS include
LIBRARIES interactive_checkerboard_finder rgbd_calibration
CATKIN_DEPENDS roscpp calibration_common geometry_msgs kinect
eigen_conversions camera_info_manager cv_bridge pcl_ros image_transport
DEPENDS eigen3 pcl opencv2
)
###########
## Build ##
###########
## Specify additional locations of header files
include_directories(include
${catkin_INCLUDE_DIRS}
${EIGEN_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
)
## Declare a cpp library
add_library(rgbd_calibration
src/rgbd_calibration/calibration.cpp include/rgbd_calibration/calibration.h
include/rgbd_calibration/globals.h
src/rgbd_calibration/depth_undistortion_estimation.cpp include/rgbd_calibration/depth_undistortion_estimation.h
src/rgbd_calibration/checkerboard_views.cpp include/rgbd_calibration/checkerboard_views.h
src/rgbd_calibration/checkerboard_views_extractor.cpp include/rgbd_calibration/checkerboard_views_extractor.h
src/rgbd_calibration/publisher.cpp include/rgbd_calibration/publisher.h
)
add_executable(rgbd_offline_calibration
src/rgbd_calibration/calibration_node.cpp include/rgbd_calibration/calibration_node.h
src/rgbd_calibration/offline_calibration_node.cpp include/rgbd_calibration/offline_calibration_node.h
)
#add_executable(simulation
# src/rgbd_calibration/simulation_node.cpp include/rgbd_calibration/simulation_node.h
#)
add_executable(test_calibration
src/rgbd_calibration/test_node.cpp include/rgbd_calibration/test_node.h
src/rgbd_calibration/calibration_test.cpp include/rgbd_calibration/calibration_test.h
)
add_executable(data_collection
src/rgbd_calibration/data_collection_node.cpp
)
## Add dependencies to the executable
# add_dependencies(calibration_node ${PROJECT_NAME})
## Specify libraries to link a library or executable target against
target_link_libraries(rgbd_calibration
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
)
target_link_libraries(rgbd_offline_calibration
rgbd_calibration
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
)
#target_link_libraries(simulation
# rgbd_calibration
# ${catkin_LIBRARIES}
# ${PCL_LIBRARIES}
# ${OpenCV_LIBS}
# ${CERES_LIBRARIES}
#)
target_link_libraries(test_calibration
rgbd_calibration
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
)
target_link_libraries(data_collection
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
)
#############
## Install ##
#############
## Mark executable scripts (Python etc.) for installation
## not required for python when using catkin_python_setup()
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables and/or libraries for installation
# install(TARGETS calibration calibration_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
#############
## Testing ##
#############
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/polynomial_undistortion_matrix_multifit_test.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test
# ${catkin_LIBRARIES}
# ${PCL_LIBRARIES}
# ${OpenCV_LIBS}
# ${CERES_LIBRARIES})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
You need to use STL's std::vector<>, CV does not have a vector implementation:
#include <vector>
...
std::vector<cv::Point> points;
...
I have the following cmake file to download, build and install zlib:
cmake_minimum_required ( VERSION 2.8.7 )
include (ExternalProject)
if(UNIX)
# An external project for zlib
SET (GIT_URL https://github.com/madler/zlib.git)
SET (ZLIB_INSTALL ${CMAKE_CURRENT_BINARY_DIR})
SET (ZLIB_INCLUDE ${CMAKE_BINARY_DIR}/include/zlib)
SET (ZLIB_STATIC ${CMAKE_BINARY_DIR}/lib/libz.a )
ExternalProject_Add(zlib
PREFIX zlib
GIT_REPOSITORY ${GIT_URL}
INSTALL_DIR ${ZLIB_INSTALL}
PATCH_COMMAND ${CMAKE_COMMAND} -E remove <SOURCE_DIR>/zconf.h
BUILD_IN_SOURCE 1
PATCH_COMMAND ""
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --includedir=${ZLIB_INCLUDE}
)
SET (ZLIB_INCLUDE_DIR ${ZLIB_INSTALL}/include/zlib)
SET (ZLIB_LIBRARY "${ZLIB_INSTALL}")
ADD_LIBRARY (ZLIB_LIB STATIC IMPORTED DEPENDS zlib)
SET_TARGET_PROPERTIES (ZLIB_LIB PROPERTIES IMPORTED_LOCATION "${ZLIB_STATIC}")
endif(UNIX)
But this cmake file only install zlib. I want also install minizip. Minizip is "part of zlib". In the zlib repository has a directory that has minizip.
How can I also install minizip in the same cmake file? Is it possible?
The minizip is inside zlib repository:
- zlib
- contrib
- minizip
- ....
- ...
- ...
I have cmake file to install minizip:
cmake_minimum_required(VERSION 2.8)
project(minizip)
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
set(BUILD_SHARED_LIBS OFF)
find_package (ZLIB REQUIRED)
if (ZLIB_FOUND)
set(ZLIB_LIBRARY ${CMAKE_BINARY_DIR}/ZLIB/src/ZLIB/contrib)
SET (minizip ${CMAKE_BINARY_DIR}/lib/minizip)
if(CMAKE_HOST_APPLE)
set(PLATFORM __APPLE__)
elseif(CMAKE_HOST_UNIX)
set(PLATFORM unix)
elseif(CMAKE_HOST_WIN32)
set(PLATFORM _WIN32)
else(CMAKE_HOST_APPLE)
message(FATAL_ERROR "Not supported Platform")
endif(CMAKE_HOST_APPLE)
add_definitions(-D${PLATFORM})
set(SOURCE
${ZLIB_LIBRARY}/minizip/ioapi.c
${ZLIB_LIBRARY}/minizip/miniunz.c
${ZLIB_LIBRARY}/minizip/minizip.c
${ZLIB_LIBRARY}/minizip/unzip.c
${ZLIB_LIBRARY}/minizip/zip.c
)
if(WIN32)
set(SOURCE ${SOURCE} ${ZLIB_LIBRARY}/minizip/iowin32.c)
endif(WIN32)
set(HEADERS
${ZLIB_LIBRARY}/minizip/crypt.h
${ZLIB_LIBRARY}/minizip/ioapi.h
${ZLIB_LIBRARY}/minizip/miniunz.h
${ZLIB_LIBRARY}/minizip/unzip.h
)
if(WIN32)
set(HEADERS ${HEADERS} ${ZLIB_LIBRARY}/minizip/iowin32.h)
endif(WIN32)
add_library(minizip ${SOURCE} ${HEADERS})
target_link_libraries(minizip PUBLIC "-static" ZLIB_STATIC)
add_dependencies ( minizip zlib)
install(
TARGETS minizip EXPORT minizip-exports
INCLUDES DESTINATION "include"
RUNTIME DESTINATION "bin"
LIBRARY DESTINATION "lib"
ARCHIVE DESTINATION "lib"
)
install(
FILES ${HEADERS}
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/include/minizip"
)
ADD_LIBRARY (MINIZIP_LIB STATIC IMPORTED DEPENDS minizip)
SET_TARGET_PROPERTIES (MINIZIP_LIB PROPERTIES IMPORTED_LOCATION ${minizip})
endif()
I want before install minizip, install zlib.
But when I run
cmake ..
I have the following error:
Make Error at modules/minizip.cmake:50 (add_library):
Cannot find source file:
/home/lais/Imagens/agent/build/ZLIB/src/ZLIB/contrib/minizip/ioapi.c
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
Call Stack (most recent call first):
CMakeLists.txt:59 (include)
CMake Error: Cannot determine link language for target "minizip".
CMake Error: CMake can not determine linker language for target: minizip
And I have a top level cmake, that call for this two modules:
cmake_minimum_required( VERSION 2.8.7 )
project( project )
# version number
set ( VERSION_MAJOR 0 )
set ( VERSION_MINOR 0 )
# cpr requires c++11
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
# src : main + jsoncpp library
file ( GLOB SOURCES src/project/*.cpp )
# src : collect functions - depend on OS
if ( WIN32 )
file ( GLOB SOURCES ${SOURCES} src/project/windows/*.cpp )
else () # if( UNIX )
file ( GLOB SOURCES ${SOURCES} src/project/linux/*.cpp )
endif ()
# src : curl requests
# options for cpr
# avoid experimental use of openssl
option( CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" OFF )
# avoid building tests
option( BUILD_CPR_TESTS "Set to ON to build cpr tests." OFF )
# options for curl
# avoid building tests
option( BUILD_CURL_TESTS "Set to ON to build cURL tests." OFF )
# avoid running tests - set ON again in download version or if errors occur
option( RUN_CURL_TESTS "Set to ON to run cURL tests." OFF )
add_subdirectory ( lib/cpr )
include_directories ( ${CPR_INCLUDE_DIRS} )
include_directories ( ${CURL_INCLUDE_DIRS} )
# src : DtWinVer - Windows Version/Edition class
if ( WIN32 )
add_subdirectory ( lib/dtwinver )
endif ()
# headers
include_directories ( "include" )
include_directories ( "${CMAKE_BINARY_DIR}/include" )
# scr = libboost
include ( "modules/boost.cmake" )
# src = zlib
include ( "modules/zlib.cmake" )
# src = minizip
include ( "modules/minizip.cmake" )
# compile
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin" )
add_executable ( project-v${VERSION_MAJOR}.${VERSION_MINOR} ${SOURCES} )
target_link_libraries ( project-v${VERSION_MAJOR}.${VERSION_MINOR} ${CPR_LIBRARIES} ${CURL_LIBRARIES} ${FILESYSTEM_LIB} ${SYSTEM_LIB} ${REGEX_LIB} ${PROGRAM_OPTIONS_LIB} ${ZLIB_STATIC} ${minizip})
add_dependencies ( project-v${VERSION_MAJOR}.${VERSION_MINOR} Boost)
add_dependencies ( project-v${VERSION_MAJOR}.${VERSION_MINOR} zlib)
add_dependencies ( project-v${VERSION_MAJOR}.${VERSION_MINOR} minizip)
if ( WIN32 )
target_link_libraries ( project-v${VERSION_MAJOR}.${VERSION_MINOR} dtwinver )
else ()
# libudev
target_link_libraries ( project-v${VERSION_MAJOR}.${VERSION_MINOR} udev )
endif ()
Looks your source package is not complete.
minizip is just simple a single file minizip.c. Why do you need cmake? Just compile it and link with zlib and everything will be fine.