pschlan / cron-job.org

cron-job.org Open Source project
GNU General Public License v2.0
1.45k stars 251 forks source link

CMake MySQLClient not found #123

Closed mkleger closed 2 years ago

mkleger commented 2 years ago

When compiling, I have the problem that it always asks for the MySQL client and I can't install it.

`CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 10.2.1 -- The CXX compiler identification is GNU 10.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:35 (find_package): By not providing "FindMySQLClient.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "MySQLClient", but CMake did not find one.

Could not find a package configuration file provided by "MySQLClient" with any of the following names:

MySQLClientConfig.cmake
mysqlclient-config.cmake

Add the installation prefix of "MySQLClient" to CMAKE_PREFIX_PATH or set "MySQLClient_DIR" to a directory containing one of the above files. If "MySQLClient" provides a separate development package or SDK, be sure it has been installed.

CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.18)

should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred! See also "/root/cron-job.org-master/chronos/build/CMakeFiles/CMakeOutput.log".`

Has anyone gotten this to work on a Debian 11.2?

pschlan commented 2 years ago

You need to run cmake for the root directory, not the chronos subdirectory, i.e. your build folder needs to reside in the repository root.

E.g.

cd cron-job.org
mkdir build
cd build
cmake ..