Skip to content

Commit 5e976f6

Browse files
committed
-
1 parent df0ba9c commit 5e976f6

4 files changed

Lines changed: 33 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,6 @@ crosscompile_prebuild_steps()
371371
include_directories("extern/re2")
372372
include_directories("extern/boost")
373373

374-
if(BUILD_LIBTOM)
375-
include_directories("extern/libtommath")
376-
include_directories("extern/libtomcrypt/src/headers")
377-
endif()
378374

379375
include_directories("extern/decNumber")
380376
include_directories("extern/icu/include")
@@ -439,11 +435,31 @@ if(BUILD_LIBTOM)
439435
########################################
440436
# LIBRARY libtommath
441437
########################################
438+
set(libtommath_ID tommath)
442439

443-
file(GLOB libtommath_src "extern/libtommath/*.c" "extern/libtommath/*.h")
440+
if (LIBTOMMATH_VER)
441+
set(LIBTOMMATH_DIR "extern/libtommath-${LIBTOMMATH_VER}")
442+
else()
443+
set(LIBTOMMATH_DIR "extern/libtommath")
444+
endif()
445+
include_directories("${LIBTOMMATH_DIR}")
446+
447+
# # test build vith MSVS
448+
# d: && cd d:/source/COMPONENTS/SQLfb/code/extern/libtommath-1.2
449+
# "c:/Program Files/Microsoft Visual Studio/18/Community/MSBuild/Current/Bin/MSBuild.exe" libtommath_MSVC15.sln /p:Configuration=Release /t:Rebuild /p:Platform=x64
450+
# execute_process(COMMAND
451+
# ${CMAKE_VS_MSBUILD_COMMAND} ${LIBTOMMATH_DIR}/libtommath_MSVC15.sln
452+
# /p:Configuration=Release /t:Rebuild
453+
# /p:Platform=x64
454+
# WORKING_DIRECTORY ${LIBTOMMATH_DIR})
455+
# file(COPY "${LIBTOMMATH_DIR}/lib/x64/Release/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
456+
# set(libtommath_ID tommath)
457+
# #
458+
459+
file(GLOB libtommath_src "${LIBTOMMATH_DIR}/*.c" "${LIBTOMMATH_DIR}/*.h")
460+
add_library (${libtommath_ID} ${libtommath_src})
461+
project_group (${libtommath_ID} Extern)
444462

445-
add_library (${libtommath_ID} ${libtommath_src})
446-
project_group (${libtommath_ID} Extern)
447463

448464
if (WIN32 AND USE_TTMATH_MASM)
449465
add_custom_command(TARGET ${libtommath_ID} PRE_BUILD
@@ -453,18 +469,19 @@ if (WIN32 AND USE_TTMATH_MASM)
453469
"${CMAKE_CURRENT_SOURCE_DIR}/extern/ttmath/ttmathuint_x86_64_msvc.asm"
454470
)
455471
set(libtommath_x86_64_masm_obj "${CMAKE_CURRENT_BINARY_DIR}/ttmathuint_x86_64_msvc.obj")
472+
target_link_libraries (${libtommath_ID} ${LIB_builtins_Clang} ${libtommath_x86_64_masm_obj})
456473
message("use TTMATH MASM")
457474
else()
458475
message("not use TTMATH MASM")
459476
add_definitions("-DTTMATH_NOASM")
460477
endif()
461478

462-
target_link_libraries (${libtommath_ID} ${LIB_builtins_Clang} ${libtommath_x86_64_masm_obj})
463-
464479
########################################
465480
# LIBRARY libtomcrypt
466481
########################################
467482

483+
set(libtomcrypt_ID tomcrypt)
484+
468485
file(GLOB_RECURSE libtomcrypt_src "extern/libtomcrypt/src/*")
469486
list(FILTER libtomcrypt_src EXCLUDE REGEX ".*aes_tab.c")
470487
list(FILTER libtomcrypt_src EXCLUDE REGEX ".*whirltab.c")
@@ -474,6 +491,7 @@ add_library (${libtomcrypt_ID} ${libtomcrypt_src})
474491
target_compile_definitions (${libtomcrypt_ID} PRIVATE LTC_NO_ROLC LTC_SOURCE)
475492
target_link_libraries (${libtomcrypt_ID} ${libtommath_ID})
476493
project_group (${libtomcrypt_ID} Extern)
494+
include_directories("extern/libtomcrypt/src/headers")
477495

478496
endif()
479497

builds/cmake/BuildICU.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ function(build_icu4c ICU_VER)
120120
if (WIN32)
121121

122122
# file(COPY mh-unknown "${ICU_DIR}/ICU/icu/source/config/mh-unknown")
123-
124-
set(CMAKE_VS_MSBUILD_COMMAND "c:/Program Files/Microsoft Visual Studio/18/Community/MSBuild/Current/Bin/MSBuild.exe")
125-
123+
126124
execute_process(COMMAND
127125
${CMAKE_VS_MSBUILD_COMMAND} icu/source/allinone/allinone.sln
128126
/p:Configuration=Release /t:Rebuild

src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ add_custom_command(
161161
msg_fdb
162162
#
163163
COMMAND ${CMAKE_COMMAND} -E remove firebird.msg
164-
COMMAND ${BUILD_MSG_CMD} -D msg.fdb -P ${CMAKE_CURRENT_BINARY_DIR}/ -F firebird.msg -L all
165-
COMMAND ${BUILD_MSG_CMD} -D msg.fdb -P ${CMAKE_CURRENT_BINARY_DIR}/ -F firebird.msg
164+
COMMAND ${BUILD_MSG_CMD} -F ${CMAKE_CURRENT_BINARY_DIR}/firebird.msg
165+
# COMMAND ${BUILD_MSG_CMD} -D msg.fdb -P ${CMAKE_CURRENT_BINARY_DIR}/ -F firebird.msg
166166
COMMAND ${CMAKE_COMMAND} -E copy_if_different firebird.msg ${output_dir}/firebird.msg
167167
)
168168
# add_custom_command(
@@ -177,8 +177,8 @@ add_custom_command(
177177
# COMMAND ${CODES_CMD} ${CMAKE_CURRENT_SOURCE_DIR}/include/gen ${CMAKE_CURRENT_SOURCE_DIR}/../lang_helpers
178178
# )
179179
# add_custom_target(messages ALL DEPENDS firebird.msg codes_headers.dummy)
180-
# add_custom_target(messages ALL DEPENDS firebird.msg)
181-
# project_group(messages "Boot/Custom build steps")
180+
add_custom_target(messages ALL DEPENDS firebird.msg)
181+
project_group(messages "Boot/Custom build steps")
182182

183183

184184
########################################

src/remote/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ add_src_win32(fbserver_src
5353
server/os/win32/server.ico
5454
server/os/win32/caution.ico
5555
server/os/win32/window.rc
56-
server/ReplServer.cpp
56+
# server/ReplServer.cpp
5757
server/server.cpp
5858
)
5959
add_src_unix(fbserver_src

0 commit comments

Comments
 (0)