summaryrefslogtreecommitdiff
path: root/build/win32vs
diff options
context:
space:
mode:
Diffstat (limited to 'build/win32vs')
-rwxr-xr-xbuild/win32vs/CMakeLists.txt98
1 files changed, 62 insertions, 36 deletions
diff --git a/build/win32vs/CMakeLists.txt b/build/win32vs/CMakeLists.txt
index 516b9c9..f514c5c 100755
--- a/build/win32vs/CMakeLists.txt
+++ b/build/win32vs/CMakeLists.txt
@@ -2,12 +2,13 @@ cmake_minimum_required(VERSION 3.0)
project (xbase64)
set( xbase_VERSION_MAJOR 4 )
-set( xbase_VERSION_MINOR 0 )
-set( xbase_VERSION_PATCH 3 )
+set( xbase_VERSION_MINOR 1 )
+set( xbase_VERSION_PATCH 0 )
MESSAGE( "--- Xbase build for: " ${CMAKE_SYSTEM_NAME} )
MESSAGE( "--- Compiler: " ${CMAKE_CXX_COMPILER_ID} )
MESSAGE( "--- Project Name: " ${CMAKE_PROJECT_NAME} )
+MESSAGE( "--- Install Prefix: " ${CMAKE_INSTALL_PREFIX} )
#Set compiler options
@@ -152,42 +153,43 @@ IF( NOT ${iSize} EQUAL 8 )
ENDIF( NOT ${iSize} EQUAL 8 )
#Library options
-option( BUILD_SHARED_LIBS "Build shared libraries?" ON)
-option( XB_DEBUG_SUPPORT "Compile debug logic into library?" ON)
-option( XB_UTILS_SUPPORT "Compile utility programs?" ON)
-option( XB_EXAMPLES_SUPPORT "Compile example programs?" ON)
-option( XB_MEMO_SUPPORT "Compile memo field support into library?" ON)
-option( XB_LOGGING_SUPPORT "Compile message logging support into library" ON)
+option( BUILD_SHARED_LIBS "Build shared libraries" ON)
option( XB_DBF3_SUPPORT "Compile DBase File Format Version 3 support" ON)
option( XB_DBF4_SUPPORT "Compile DBase File Format Version 4 support" ON)
-option( XB_LINKLIST_SUPPORT "Compile Link List routines into library" ON)
+option( XB_MEMO_SUPPORT "Compile memo field support into library" ON)
+option( XB_NDX_SUPPORT "Compile NDX Index support into library" ON)
+option( XB_MDX_SUPPORT "Compile MDX Index support into library" ON)
option( XB_LOCKING_SUPPORT "Compile Multi User Locking support into library" ON)
+
+option( XB_LOGGING_SUPPORT "Compile message logging support into library" ON)
+option( XB_LINKLIST_SUPPORT "Compile Link List routines into library" ON)
option( XB_FUNCTION_SUPPORT "Compile XBase Function support into library" ON)
option( XB_EXPRESSION_SUPPORT "Compile Expression support into library" ON)
-option( XB_NDX_SUPPORT "Compile NDX Index support into library" ON)
-option( XB_MDX_SUPPORT "Compile MDX Index support into library" ON)
-option( XB_SQL_SUPPORT "Compile SQL support into library" ON)
option( XB_INF_SUPPORT "Compile NDX INF file support into library" ON)
option( XB_FILTER_SUPPORT "Compile Filter support into library" ON)
-
+option( XB_BLOCKREAD_SUPPORT "Compile Block Read support into library" ON)
+option( XB_SQL_SUPPORT "Compile SQL support into library - alpha" ON)
+option( XB_DEBUG_SUPPORT "Compile debug logic into library" ON)
+option( XB_UTILS_SUPPORT "Compile utility programs" ON)
+option( XB_EXAMPLES_SUPPORT "Compile example programs" ON)
Message( "--- BUILD_SHARED_LIBS " ${BUILD_SHARED_LIBS})
-Message( "--- XB_MEMO_SUPPORT " ${XB_MEMO_SUPPORT})
-Message( "--- XB_DEBUG_SUPPORT " ${XB_DEBUG_SUPPORT})
-Message( "--- XB_UTILS_SUPPORT " ${XB_UTILS_SUPPORT})
-Message( "--- XB_EXAMPLES_SUPPORT " ${XB_EXAMPLES_SUPPORT})
-Message( "--- XB_LOGGING_SUPPORT " ${XB_LOGGING_SUPPORT})
Message( "--- XB_DBF3_SUPPORT " ${XB_DBF3_SUPPORT})
Message( "--- XB_DBF4_SUPPORT " ${XB_DBF4_SUPPORT})
-Message( "--- XB_LINKLIST_SUPPORT " ${XB_LINKLIST_SUPPORT})
+Message( "--- XB_MEMO_SUPPORT " ${XB_MEMO_SUPPORT})
+Message( "--- XB_NDX_SUPPORT " ${XB_NDX_SUPPORT})
+Message( "--- XB_MDX_SUPPORT " ${XB_MDX_SUPPORT})
Message( "--- XB_LOCKING_SUPPORT " ${XB_LOCKING_SUPPORT})
+Message( "--- XB_LINKLIST_SUPPORT " ${XB_LINKLIST_SUPPORT})
Message( "--- XB_FUNCTION_SUPPORT " ${XB_FUNCTION_SUPPORT})
Message( "--- XB_EXPRESSION_SUPPORT " ${XB_EXPRESSION_SUPPORT})
-Message( "--- XB_NDX_SUPPORT " ${XB_NDX_SUPPORT})
-Message( "--- XB_MDX_SUPPORT " ${XB_MDX_SUPPORT})
+Message( "--- XB_FILTER_SUPPORT " ${XB_FILTER_SUPPORT})
+Message( "--- XB_DEBUG_SUPPORT " ${XB_DEBUG_SUPPORT})
+Message( "--- XB_UTILS_SUPPORT " ${XB_UTILS_SUPPORT})
+Message( "--- XB_EXAMPLES_SUPPORT " ${XB_EXAMPLES_SUPPORT})
+Message( "--- XB_LOGGING_SUPPORT " ${XB_LOGGING_SUPPORT})
Message( "--- XB_SQL_SUPPORT " ${XB_SQL_SUPPORT})
Message( "--- XB_INF_SUPPORT " ${XB_INF_SUPPORT})
-Message( "--- XB_FILTER_SUPPORT " ${XB_FILTER_SUPPORT})
IF( XB_DEBUG_SUPPORT )
Message( "--- Adding debug support" )
@@ -218,6 +220,7 @@ CHECK_INCLUDE_FILES (ctype.h HAVE_CTYPE_H)
CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILES (fcntl.h HAVE_FCNTL_H)
CHECK_INCLUDE_FILES (inttypes.h HAVE_INTTYPES_H)
+CHECK_INCLUDE_FILES (pwd.h HAVE_PWD_H)
CHECK_INCLUDE_FILES (stdarg.h HAVE_STDARG_H)
CHECK_INCLUDE_FILES (stdargs.h HAVE_STDARGS_H)
CHECK_INCLUDE_FILES (string.h HAVE_STRING_H)
@@ -250,6 +253,8 @@ CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF_F)
CHECK_FUNCTION_EXISTS(_vsnprintf_s HAVE__VSNPRINTF_S_F)
+CHECK_FUNCTION_EXISTS(getopt HAVE_GETOPT_F)
+
IF( WIN32 )
# Use CHECK_SYMBOL_EXISTS for the Win32API instead of CHECK_FUNCTION_EXISTS
@@ -261,8 +266,6 @@ INCLUDE( CheckSymbolExists )
CHECK_SYMBOL_EXISTS(CreateProcessW Windows.h HAVE_CREATEPROCESSW_F )
CHECK_SYMBOL_EXISTS(vsprintf_s stdio.h HAVE_VSPRINTF_S_F )
-
-
ENDIF ( WIN32 )
# IF( NOT HAVE_SENTENDOFFILE_F AND NOT HAVE_FTRUNCATE_F AND BORLAND )
@@ -300,7 +303,6 @@ set( EXTRA_LIBS ${EXTRA_LIBS} ${XB_LIBNAME})
-
# Undo bad decisions
IF( XB_PLATFORM_32 AND XB_LARGEFILE_SUPPORT )
MESSAGE( "--- Can't build 64 bit environment with a 32 bit compiler" )
@@ -353,6 +355,10 @@ IF( XB_FILTER_SUPPORT AND NOT XB_EXPRESSION_SUPPORT )
set( XB_EXPRESSION_SUPPORT ON CACHE BOOL "Compile Expression support into library" FORCE )
ENDIF( XB_FILTER_SUPPORT AND NOT XB_EXPRESSION_SUPPORT )
+IF( XB_SQL_SUPPORT AND NOT XB_BLOCKREAD_SUPPORT )
+ MESSAGE( "--- BLOCKREAD support required for SQL. Setting to ON" )
+ set( XB_BLOCKREAD_SUPPORT ON CACHE BOOL "Compile Block Read support into library" FORCE )
+ENDIF( XB_SQL_SUPPORT AND NOT XB_BLOCKREAD_SUPPORT )
# Build configuration header file
@@ -445,6 +451,7 @@ IF( XB_SQL_SUPPORT )
set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/sql/xbinsert.cpp )
set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/sql/xbset.cpp )
set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/sql/xbsql.cpp )
+ set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/sql/xbstmt.cpp )
set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/sql/xbselect.cpp )
ENDIF( XB_SQL_SUPPORT )
@@ -453,6 +460,9 @@ IF( XB_FILTER_SUPPORT )
set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/core/xbfilter.cpp )
ENDIF( XB_FILTER_SUPPORT )
+IF( XB_BLOCKREAD_SUPPORT )
+ set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/core/xbblockread.cpp )
+ENDIF( XB_BLOCKREAD_SUPPORT )
include( GenerateExportHeader )
@@ -593,6 +603,12 @@ target_link_libraries( xb_test_filter ${EXTRA_LIBS})
add_test( NAME xbFilter COMMAND xb_test_filter QUIET )
ENDIF( XB_FILTER_SUPPORT )
+IF( XB_BLOCKREAD_SUPPORT )
+add_executable( xb_test_blockread ${PROJECT_SOURCE_DIR}/tests/xb_test_blockread.cpp )
+target_link_libraries( xb_test_blockread ${EXTRA_LIBS})
+add_test( NAME xbBlockRead COMMAND xb_test_blockread QUIET )
+ENDIF( XB_BLOCKREAD_SUPPORT )
+
IF( XB_LOCKING_SUPPORT )
add_executable( xb_test_lock ${PROJECT_SOURCE_DIR}/tests/xb_test_lock.cpp )
@@ -633,6 +649,8 @@ IF( XB_EXAMPLES_SUPPORT )
add_executable( xb_ex_v4_upd_dbf ${PROJECT_SOURCE_DIR}/examples/xb_ex_v4_upd_dbf.cpp )
target_link_libraries( xb_ex_v4_upd_dbf ${EXTRA_LIBS})
+ add_executable( xb_ex_ssv ${PROJECT_SOURCE_DIR}/examples/xb_ex_ssv.cpp )
+ target_link_libraries( xb_ex_ssv ${EXTRA_LIBS})
ENDIF( XB_EXAMPLES_SUPPORT )
@@ -654,13 +672,9 @@ IF( XB_UTILS_SUPPORT )
add_executable( xb_dumpdbt ${PROJECT_SOURCE_DIR}/utils/xb_dumpdbt.cpp )
target_link_libraries( xb_dumpdbt ${EXTRA_LIBS})
- add_executable( xb_dumphdr ${PROJECT_SOURCE_DIR}/utils/xb_dumphdr.cpp )
- target_link_libraries( xb_dumphdr ${EXTRA_LIBS})
-
add_executable( xb_dumprecs ${PROJECT_SOURCE_DIR}/utils/xb_dumprecs.cpp )
target_link_libraries( xb_dumprecs ${EXTRA_LIBS})
-
add_executable( xb_tblinfo ${PROJECT_SOURCE_DIR}/utils/xb_tblinfo.cpp )
target_link_libraries( xb_tblinfo ${EXTRA_LIBS})
@@ -675,20 +689,14 @@ IF( XB_UTILS_SUPPORT )
add_executable( xb_undelall ${PROJECT_SOURCE_DIR}/utils/xb_undelall.cpp )
target_link_libraries( xb_undelall ${EXTRA_LIBS})
- add_executable( xb_zap ${PROJECT_SOURCE_DIR}/utils/xb_zap.cpp )
- target_link_libraries( xb_zap ${EXTRA_LIBS})
-
-
install (TARGETS xb_cfg_check DESTINATION bin)
install (TARGETS xb_copydbf DESTINATION bin)
install (TARGETS xb_dbfutil DESTINATION bin)
install (TARGETS xb_deletall DESTINATION bin)
install (TARGETS xb_dumpdbt DESTINATION bin)
- install (TARGETS xb_dumphdr DESTINATION bin)
install (TARGETS xb_dumprecs DESTINATION bin)
install (TARGETS xb_pack DESTINATION bin)
install (TARGETS xb_undelall DESTINATION bin)
- install (TARGETS xb_zap DESTINATION bin)
IF( XB_SQL_SUPPORT )
install (TARGETS xb_execsql DESTINATION bin)
ENDIF( XB_SQL_SUPPORT )
@@ -721,10 +729,28 @@ install (FILES include/xbconfig.h
${PROJECT_SOURCE_DIR}/include/xbuda.h
${PROJECT_SOURCE_DIR}/include/xbtag.h
${PROJECT_SOURCE_DIR}/include/xbfilter.h
+ ${PROJECT_SOURCE_DIR}/include/xbblkread.h
+ ${PROJECT_SOURCE_DIR}/include/xbsql.h
+
DESTINATION include/${CMAKE_PROJECT_NAME})
+IF( NOT WIN32 )
+install (FILES ${PROJECT_PARENT_DIR}/docs/man/xb_cfg_chk.1.gz
+ ${PROJECT_PARENT_DIR}/docs/man/xb_copydbf.1.gz
+ ${PROJECT_PARENT_DIR}/docs/man/xb_dbfutil.1.gz
+ ${PROJECT_PARENT_DIR}/docs/man/xb_deletall.1.gz
+ ${PROJECT_PARENT_DIR}/docs/man/xb_dumpdbt.1.gz
+ ${PROJECT_PARENT_DIR}/docs/man/xb_dumprecs.1.gz
+ ${PROJECT_PARENT_DIR}/docs/man/xb_pack.1.gz
+ ${PROJECT_PARENT_DIR}/docs/man/xb_tblinfo.1.gz
+ ${PROJECT_PARENT_DIR}/docs/man/xb_undelall.1.gz
+
+ DESTINATION man/man1)
+
+ENDIF( NOT WIN32 )
+
-SET_TARGET_PROPERTIES( ${XB_LIBNAME} PROPERTIES VERSION 4.0.3 SOVERSION 0 )
+SET_TARGET_PROPERTIES( ${XB_LIBNAME} PROPERTIES VERSION 4.1.0 SOVERSION 0 )
IF( EXISTS /usr/local/lib64 )
install (TARGETS ${XB_LIBNAME} DESTINATION lib64/${CMAKE_PROJECT_NAME})