On 27 October 2012 13:08, Mateusz Loskot <[email protected]> wrote:
> On 27 October 2012 05:03, Pawel Aleksander Fedorynski <[email protected]>
> wrote:
>>
>> BTW: Either something's wrong with the cmake scripts or I don't know how to
>> use it. I have mysql installed in a somewhat weird place. I tried the
>> following:
>>
>> cmake -G "Unix Makefiles" -DWITH_BOOST=OFF
>> -DMYSQL_INCLUDE_DIR=/opt/local/include/mysql55/mysql/
>> -DMYSQL_LIBRARIES=/opt/local/lib/mysql55/mysql/libmysqlclient_r.dylib
>> ../soci/src/
>>
>> and it didn't work: MYSQL_INCLUDE_DIR was found correctly but
>> MYSQL_LIBRARIES was listed as not found:
>>
>> -- MySQL:
>> -- WARNING:
>> -- MySQL not found, some libraries or features will be disabled.
>> -- See the documentation for MySQL or manually set these variables:
>> -- MYSQL_INCLUDE_DIR = /opt/local/include/mysql55/mysql
>> -- MYSQL_LIBRARIES = MYSQL_LIBRARY-NOTFOUND
>> [...]
>
> Yes, there may be a problem indeed.
> This weekend, I'm working on CMake config improvements,
> so hoping to get it fixed.
Paweł,
Can you make a quick test?
1. Go to src/cmake/modules
2. Rename FindMySQL.cmake to a non-cmake module, e.g. mv FindMySQL.cmake x.tmp
3. Run your cmake command again
You will see some warnings, but the MYSQL_* variables should now
point to your custom locations.
For example:
$ cmake -DWITH_BOOST=OFF -DSOCI_EMPTY=OFF -DSOCI_ODBC=OFF
-DSOCI_POSTGRESQL=OFF -DSOCI_SQLITE3=OFF
-DMYSQL_INCLUDE_DIR=/opt/mysql-5.0.96-linux-x86_64-glibc23/include
-DMYSQL_LIBRARIES=/opt/mysql-5.0.96-linux-x86_64-glibc23/lib/libmysqlclient_r.a
../soci/src
-- Configuring SOCI:
-- SOCI_VERSION = 3.1.0
-- SOCI_ABI_VERSION = 3.1
-- SOCI_PLATFORM_NAME = x64
-- SOCI_COMPILER_NAME = gcc-4.7.2
-- SOCI_TESTS = ON
-- Looking for SOCI dependencies:
-- Boost: disabled, since WITH_BOOST=OFF
-- MySQL:
CMake Warning at cmake/dependencies/MySQL.cmake:3 (find_package):
By not providing "FindMySQL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "MySQL", but
CMake did not find one.
Could not find a package configuration file provided by "MySQL" with any of
the following names:
MySQLConfig.cmake
mysql-config.cmake
Add the installation prefix of "MySQL" to CMAKE_PREFIX_PATH or set
"MySQL_DIR" to a directory containing one of the above files. If "MySQL"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
cmake/SociDependencies.cmake:75 (include)
CMakeLists.txt:62 (include)
-- WARNING:
-- MySQL not found, some libraries or features will be disabled.
-- See the documentation for MySQL or manually set these variables:
-- MYSQL_INCLUDE_DIR =
/opt/mysql-5.0.96-linux-x86_64-glibc23/include
-- MYSQL_LIBRARIES =
/opt/mysql-5.0.96-linux-x86_64-glibc23/lib/libmysqlclient_r.a
In /opt/mysql-5.0.96-linux-x86_64-glibc23, I have the generic binaries
downloaded from MySQL website.
If this fix works, we may simply give up on using custom FindMySQL.cmake
and rely on the one provided by CMake distribution.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people. Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users