File: CMakeLists.txt

package info (click to toggle)
tarantool 2.6.0-1.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 85,396 kB
  • sloc: ansic: 513,775; cpp: 69,493; sh: 25,650; python: 19,190; perl: 14,973; makefile: 4,176; yacc: 1,329; sql: 1,074; pascal: 620; ruby: 190; awk: 18; lisp: 7
file content (49 lines) | stat: -rw-r--r-- 1,846 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
add_subdirectory(dist)
add_subdirectory(luarocks)

if (TARGET_OS_DARWIN)
	# NOTE: need add execution 'plutil -lint org.tarantool.tarantool.plist
	# to check syntax of plist file.
	# Also cmake doesn't support changing package id from 'com.' to 'org.'
	# Need chage to 'org.' after update lines this file:
	# https://github.com/Kitware/CMake/blob/v2.8.11.2/Source/CPack/cmCPackPackageMakerGenerator.cxx#L763
	#
	# ^^^ DO NOT CHANGE DARWIN_PACKAGE_ID BEFORE SEE URL ABOVE ^^^
	#
	set (DARWIN_PACKAGE_ID "com")
	set (LUANCHD_PLIST "${DARWIN_PACKAGE_ID}.${CPACK_PACKAGE_VENDOR}.tarantool.plist")
	# Configure scripts for *.pkg and luanchd daemon by templates
	configure_file(dmg/postflight.in postflight @ONLY)
	configure_file(org.tarantool.in ${LUANCHD_PLIST} @ONLY)
	# chmod +x 644
	install (FILES ${CMAKE_BINARY_DIR}/extra/${LUANCHD_PLIST}
                 DESTINATION share/tarantool
         PERMISSIONS
         OWNER_READ OWNER_WRITE
         GROUP_READ GROUP_READ
         WORLD_READ WORLD_READ)
endif()

if (CMAKE_CROSSCOMPILING)
    add_custom_target(txt2c
        COMMAND ${CMAKE_HOST_C_COMPILER} txt2c.c
            -o "${CMAKE_CURRENT_BINARY_DIR}/txt2c"
        DEPENDS txt2c.c)
    add_custom_target(bin2c
        COMMAND ${CMAKE_HOST_C_COMPILER} bin2c.c
            -o "${CMAKE_CURRENT_BINARY_DIR}/bin2c"
        DEPENDS bin2c.c)
    add_custom_target(lemon
        COMMAND ${CMAKE_HOST_C_COMPILER} lemon.c
            -o "${CMAKE_CURRENT_BINARY_DIR}/lemon"
        DEPENDS lemon.c)
    add_custom_target(mkkeywordhash
        COMMAND ${CMAKE_HOST_C_COMPILER} mkkeywordhash.c
            -o "${CMAKE_CURRENT_BINARY_DIR}/mkkeywordhash"
        DEPENDS mkkeywordhash.c)
else()
    add_executable(txt2c txt2c.c)
    add_executable(bin2c bin2c.c)
    add_executable(lemon lemon.c)
    add_executable(mkkeywordhash mkkeywordhash.c)
endif()