8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:43:03 +01:00

[build] [cmake] Update build according to the last changes.

This commit is contained in:
egorpugin 2015-01-26 15:23:27 +00:00
parent b5d0667cce
commit d75a3ec4d6
4 changed files with 28 additions and 25 deletions

View File

@ -238,8 +238,9 @@ file(GLOB btyacc_src "extern/btyacc/*.c" "extern/btyacc/*.h")
if (NOT CMAKE_CROSSCOMPILING)
add_executable (btyacc ${btyacc_src})
project_group (btyacc Extern)
add_executable (btyacc ${btyacc_src})
project_group (btyacc Extern)
set_output_directory (btyacc . FORCE)
endif() # if (NOT CMAKE_CROSSCOMPILING)
@ -250,8 +251,8 @@ endif() # if (NOT CMAKE_CROSSCOMPILING)
file(GLOB libtommath_src "extern/libtommath/*.c" "extern/libtommath/*.h")
add_library (libtommath ${libtommath_src})
project_group (libtommath Extern)
add_library (libtommath ${libtommath_src})
project_group (libtommath Extern)
########################################

View File

@ -136,7 +136,7 @@ endfunction(add_epp_suffix)
#######################################
function(set_win32 var)
if (WIN32)
set(${var} ${ARGN} PARENT_SCOPE)
set(${var} "${ARGN}" PARENT_SCOPE)
endif()
endfunction(set_win32)
@ -145,7 +145,7 @@ endfunction(set_win32)
#######################################
function(set_unix var)
if (UNIX)
set(${var} ${ARGN} PARENT_SCOPE)
set(${var} "${ARGN}" PARENT_SCOPE)
endif()
endfunction(set_unix)
@ -154,7 +154,7 @@ endfunction(set_unix)
#######################################
function(set_apple var)
if (APPLE)
set(${var} ${ARGN} PARENT_SCOPE)
set(${var} "${ARGN}" PARENT_SCOPE)
endif()
endfunction(set_apple)

View File

@ -31,9 +31,9 @@ add_custom_command(
COMMAND gpre -r -m -n -z ${CMAKE_CURRENT_SOURCE_DIR}/empbuild/empbuild.e empbuild.c
)
add_executable (empbuild empbuild.c ${CMAKE_CURRENT_SOURCE_DIR}/empbuild/empbuild.e)
add_executable (empbuild empbuild.c empbuild.fdb ${CMAKE_CURRENT_SOURCE_DIR}/empbuild/empbuild.e)
target_link_libraries (empbuild yvalve)
set_output_directory (empbuild empbuild FORCE)
set_output_directory (empbuild . FORCE)
add_dependencies (empbuild gfix engine12 fbtrace)
project_group (empbuild Examples)
@ -47,21 +47,19 @@ foreach(F ${files})
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${F} ${name})
endforeach()
set_unix (CMD PATH=${output_dir}/bin)
set_apple(CMD DYLD_LIBRARY_PATH=${output_dir}/plugins:${output_dir}/lib ${CMD})
set(EMPBUILD_CMD empbuild employe2.fdb)
set_win32(EMPBUILD_CMD set PATH=%PATH%\\\\;${output_dir} COMMAND ${EMPBUILD_CMD})
set_unix (EMPBUILD_CMD PATH=${output_dir}/bin ${EMPBUILD_CMD})
set_apple(EMPBUILD_CMD DYLD_LIBRARY_PATH=${output_dir}/plugins:${output_dir}/lib ${EMPBUILD_CMD})
if (WIN32)
add_custom_command(OUTPUT employe2.fdb DEPENDS empbuild ${files}
COMMAND ${CMAKE_COMMAND} -E remove employe2.fdb
COMMAND set PATH=%PATH%\;${output_dir}
COMMAND ${CMD} $<TARGET_FILE:empbuild> employe2.fdb
)
else()
add_custom_command(OUTPUT employe2.fdb DEPENDS empbuild ${files}
COMMAND ${CMAKE_COMMAND} -E remove employe2.fdb
COMMAND ${CMD} $<TARGET_FILE:empbuild> employe2.fdb
)
endif()
add_custom_command(
OUTPUT employe2.fdb
DEPENDS
empbuild
${files}
COMMAND ${CMAKE_COMMAND} -E remove employe2.fdb
COMMAND ${EMPBUILD_CMD}
)
add_custom_target (employee_db DEPENDS employe2.fdb SOURCES ${files})
project_group (employee_db Examples)
@ -71,7 +69,9 @@ endif() # if (NOT CMAKE_CROSSCOMPILING)
# SHARED LIBRARY udrcpp_example
########################################
add_library (udrcpp_example SHARED udr/UdrCppExample.cpp)
file(GLOB udrcpp_example_src "udr/*")
add_library (udrcpp_example SHARED ${udrcpp_example_src})
target_link_libraries (udrcpp_example udr_engine)
set_output_directory (udrcpp_example plugins/udr)
project_group (udrcpp_example Examples)

View File

@ -181,8 +181,10 @@ add_custom_command(
add_custom_target(databases
DEPENDS
boot_engine12
msg.fdb
help.fdb
metadata.fdb
msg.fdb
security.fdb
SOURCES
${databases_src}
)