From 09877515f22be7b4cbd0a96be4814f6024ad6ce3 Mon Sep 17 00:00:00 2001 From: Ignacio Galarza Date: Fri, 31 Jul 2009 15:22:02 -0400 Subject: Bug#17270 - mysql client tool could not find ../share/charsets folder and fails. - Define and pass compile time path variables as pre-processor definitions to mimic the makefile build. - Set new CMake version and policy requirements explicitly. - Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in Platform SDK header ObjIdl.h which also defines DATADIR. --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f53a9fb146..5705a2dfe57 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR) +IF(COMMAND cmake_policy) + cmake_policy(SET CMP0005 NEW) +ENDIF(COMMAND cmake_policy) PROJECT(MySql) @@ -26,6 +29,13 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in # Set standard options ADD_DEFINITIONS(-DCMAKE_BUILD) ADD_DEFINITIONS(-DHAVE_YASSL) +ADD_DEFINITIONS(-DCMAKE_CONFIGD) +ADD_DEFINITIONS(-DDEFAULT_MYSQL_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/") +ADD_DEFINITIONS(-DDEFAULT_BASEDIR="c:/Program Files/MySQL/") +ADD_DEFINITIONS(-DMYSQL_DATADIR="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/data") +ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/") +ADD_DEFINITIONS(-DPACKAGE=mysql) +ADD_DEFINITIONS(-DSHAREDIR="share") # Set debug options SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS") -- cgit v1.2.1