Lines Matching +full:- +full:bbuild
9 # cmake -DBUILD_FRAMEWORK=ON -Bbuild -H. -GXcode && cmake --build build
20 ## Disallow in-source builds, as CMake generated make files can collide with autotools ones
24 In-source builds are not permitted! Make a separate folder for"
31 rm -rf CMakeCache.txt CMakeFiles")
55 option(HB_BUILD_SUBSET "Build harfbuzz-subset" ON)
93 add_definitions(-DHAVE_FALLBACK)
106 add_definitions(-DHAVE_${definition_to_add})
116 add_definitions(-DHAVE_UNISTD_H)
120 add_definitions(-DHAVE_SYS_MMAN_H)
124 add_definitions(-DHAVE_XLOCALE_H)
128 add_definitions(-DHAVE_STDBOOL_H)
133 add_definitions(-wd4244 -wd4267 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS)
141 # #set (HB_VERSION_H "${PROJECT_SOURCE_DIR}/src/hb-version.h")
163 file(READ ${PROJECT_SOURCE_DIR}/src/hb-ucdn/Makefile.sources UCDNSOURCES)
195 add_prefix_to_list(LIBHB_UCDN_sources "${PROJECT_SOURCE_DIR}/src/hb-ucdn/")
199 string(REGEX MATCH "\\[(([0-9]+)\\.([0-9]+)\\.([0-9]+))\\]" HB_VERSION_MATCH ${CONFIGUREAC})
212 # COMMAND ${RAGEL} -G2 -o ${ragel_output} ${PROJECT_SOURCE_DIR}/src/${target_name}.rl -I ${PRO…
222 ## Generate hb-version.h
224 # set (HB_VERSION_H_IN "${PROJECT_SOURCE_DIR}/src/hb-version.h.in")
225 # set (HB_VERSION_H "${PROJECT_BINARY_DIR}/src/hb-version.h")
228 # execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_if_different
270 add_definitions(-DHAVE_FREETYPE=1)
272 list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-ft.cc)
273 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h)
283 add_definitions(-DHAVE_GRAPHITE2)
290 list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-graphite2.cc)
291 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-graphite2.h)
299 include_directories(src/hb-ucdn)
300 add_definitions(-DHAVE_UCDN)
302 list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-ucdn.cc)
307 add_definitions(-DHAVE_GLIB)
311 pkg_check_modules(PC_GLIB QUIET glib-2.0)
313 find_library(GLIB_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS})
314 …R} ${PC_LIBRARY_DIRS} ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0/include)
315 …NCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0)
319 list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc)
320 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h)
328 add_definitions(-DHAVE_ICU)
332 pkg_check_modules(PC_ICU QUIET icu-uc)
339 list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-icu.cc)
340 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-icu.h)
349 add_definitions(-DHAVE_CORETEXT)
351 list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-coretext.cc)
352 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-coretext.h)
383 add_definitions(-DHAVE_UNISCRIBE)
385 list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-uniscribe.cc)
386 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-uniscribe.h)
392 add_definitions(-DHAVE_DIRECTWRITE)
394 list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-directwrite.cc)
395 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-directwrite.h)
403 # Use the hints from glib-2.0.pc to find glib-mkenums
405 pkg_check_modules(PC_GLIB QUIET glib-2.0)
406 find_program(GLIB_MKENUMS glib-mkenums
414 # first determine whether glib-mkenums is a Python or PERL
416 execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${GLIB_MKENUMS}" --version
424 execute_process(COMMAND "${PERL_EXECUTABLE}" "${GLIB_MKENUMS}" --version
433 message(FATAL_ERROR "Unable to determine type of glib-mkenums script")
440 …message(FATAL_ERROR "HB_HAVE_GOBJECT was set, but we failed to find glib-mkenums, which is require…
443 pkg_check_modules(PC_GOBJECT QUIET gobject-2.0)
445 find_library(GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS})
446 …_path(GOBJECT_INCLUDE_DIR NAMES glib-object.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} …
451 list(APPEND hb_gobject_sources ${PROJECT_SOURCE_DIR}/src/hb-gobject-structs.cc)
453 ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc
456 ${PROJECT_SOURCE_DIR}/src/hb-gobject-structs.h
459 ${PROJECT_SOURCE_DIR}/src/hb-gobject.h
463 ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h
467 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h
469 --template=${PROJECT_SOURCE_DIR}/src/hb-gobject-enums.h.tmpl
470 --identifier-prefix hb_
471 --symbol-prefix hb_gobject
474 > ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h.tmp
476 "-DENUM_INPUT_SRC=${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h.tmp"
477 "-DENUM_OUTPUT_SRC=${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h"
478 -P ${PROJECT_SOURCE_DIR}/replace-enum-strings.cmake
479 DEPENDS ${PROJECT_SOURCE_DIR}/src/hb-gobject-enums.h.tmpl
485 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc
487 --template=${PROJECT_SOURCE_DIR}/src/hb-gobject-enums.cc.tmpl
488 --identifier-prefix hb_
489 --symbol-prefix hb_gobject
492 > ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc.tmp
494 "-DENUM_INPUT_SRC=${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc.tmp"
495 "-DENUM_OUTPUT_SRC=${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc"
496 -P ${PROJECT_SOURCE_DIR}/replace-enum-strings.cmake
497 DEPENDS ${PROJECT_SOURCE_DIR}/src/hb-gobject-enums.cc.tmpl
498 ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h
517 add_definitions(-DHAVE_INTEL_ATOMIC_PRIMITIVES)
533 add_definitions(-DHAVE_SOLARIS_ATOMIC_OPS)
541 ## Define harfbuzz-subset library
543 add_library(harfbuzz-subset ${subset_project_sources} ${subset_project_headers})
544 add_dependencies(harfbuzz-subset harfbuzz)
545 target_link_libraries(harfbuzz-subset harfbuzz ${THIRD_PARTY_LIBS})
548 set_target_properties(harfbuzz harfbuzz-subset PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)
555 check_cxx_compiler_flag(-Bsymbolic-functions CXX_SUPPORTS_FLAG_BSYMB_FUNCS)
557 link_libraries(-Bsymbolic-functions)
562 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions")
567 set_target_properties(harfbuzz-subset PROPERTIES LINKER_LANGUAGE C)
571 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")
575 ## Define harfbuzz-gobject library
577 add_library(harfbuzz-gobject
584 add_dependencies(harfbuzz-gobject harfbuzz)
585 target_link_libraries(harfbuzz-gobject harfbuzz ${GOBJECT_LIBRARIES} ${THIRD_PARTY_LIBS})
588 set_target_properties(harfbuzz-gobject PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)
593 add_definitions("-DHB_DLL_EXPORT")
596 # On Windows, g-ir-scanner requires a DLL build in order for it to work
607 pkg_check_modules(PC_GI QUIET gobject-introspection-1.0)
609 find_program(G_IR_SCANNER g-ir-scanner
613 find_program(G_IR_COMPILER g-ir-compiler
630 set (hb_libpath "$<TARGET_FILE_DIR:harfbuzz-gobject>")
633 # Get the CFlags that we used to build HarfBuzz/HarfBuzz-GObject
636 list(APPEND hb_defines_cflags "-D${hb_cflag}")
639 # Get the other dependent libraries we used to build HarfBuzz/HarfBuzz-GObject
644 list(APPEND extra_libs "--extra-library=${extra_lib_stripped}")
658 # otherwise g-ir-scanner won't like it and give us a bunch
661 STRING(SUBSTRING "${f}" 1 -1 path)
662 if (drive MATCHES "[A-Z]")
680 TARGET harfbuzz-gobject
683 --warn-all --no-libtool --verbose
684 -n hb
685 --namespace=HarfBuzz
686 --nsversion=0.0
687 --identifier-prefix=hb_
688 --include GObject-2.0
689 --pkg-export=harfbuzz
690 --cflags-begin
691 -I${PROJECT_SOURCE_DIR}/src
692 -I${PROJECT_BINARY_DIR}/src
695 -DHB_H
696 -DHB_H_IN
697 -DHB_OT_H
698 -DHB_OT_H_IN
699 -DHB_AAT_H
700 -DHB_AAT_H_IN
701 -DHB_GOBJECT_H
702 -DHB_GOBJECT_H_IN
703 -DHB_EXTERN=
704 --cflags-end
705 --library=harfbuzz-gobject
706 --library=harfbuzz
707 -L${hb_libpath}
709 --filelist ${CMAKE_CURRENT_BINARY_DIR}/src/hb_gir_list
710 -o ${hb_libpath}/HarfBuzz-0.0.gir
711 DEPENDS harfbuzz-gobject harfbuzz ${CMAKE_CURRENT_BINARY_DIR}/src/hb_gir_list
715 TARGET harfbuzz-gobject
718 --verbose --debug
719 --includedir ${CMAKE_CURRENT_BINARY_DIR}
720 ${hb_libpath}/HarfBuzz-0.0.gir
721 -o ${hb_libpath}/HarfBuzz-0.0.typelib
722 DEPENDS ${hb_libpath}/HarfBuzz-0.0.gir harfbuzz-gobject
750 add_definitions("-DPACKAGE_NAME=\"HarfBuzz\"")
751 add_definitions("-DPACKAGE_VERSION=\"${HB_VERSION}\"")
754 add_executable(hb-view ${HB_VIEW_sources})
755 target_link_libraries(hb-view harfbuzz ${CAIRO_LIBRARIESNAMES})
757 add_executable(hb-shape ${HB_SHAPE_sources})
758 target_link_libraries(hb-shape harfbuzz)
760 add_executable(hb-subset ${HB_SUBSET_CLI_sources})
761 target_link_libraries(hb-subset harfbuzz harfbuzz-subset)
763 add_executable(hb-ot-shape-closure ${HB_OT_SHAPE_CLOSURE_sources})
764 target_link_libraries(hb-ot-shape-closure harfbuzz)
794 install(TARGETS harfbuzz-subset
798 install(TARGETS hb-view
801 install(TARGETS hb-subset
805 install(TARGETS hb-shape
809 install(TARGETS hb-ot-shape-closure
814 install(TARGETS harfbuzz-gobject
823 set (hb_libpath "$<TARGET_FILE_DIR:harfbuzz-gobject>")
826 install(FILES "${hb_libpath}/HarfBuzz-0.0.gir"
827 DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gir-1.0
830 install(FILES "${hb_libpath}/HarfBuzz-0.0.typelib"
831 DESTINATION ${CMAKE_INSTALL_LIBDIR}/girepository-1.0
839 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
840 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
843 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color")
844 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color")
851 …foreach (prog main test test-would-substitute test-size-params test-buffer-serialize hb-ot-tag tes…
855 set (prog_name test-test)
860 set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
867 …COMMAND "${PYTHON_EXECUTABLE}" ${PROJECT_SOURCE_DIR}/src/gen-def.py ${PROJECT_BINARY_DIR}/harfbuzz…
870 add_test(NAME check-static-inits.sh
871 COMMAND ${PROJECT_SOURCE_DIR}/src/check-static-inits.sh
874 add_test(NAME check-libstdc++.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-libstdc++.sh)
875 add_test(NAME check-symbols.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-symbols.sh)
878 check-static-inits.sh check-libstdc++.sh check-symbols.sh
884 add_test(NAME check-c-linkage-decls.sh COMMAND ./check-c-linkage-decls.sh)
885 add_test(NAME check-header-guards.sh COMMAND ./check-header-guards.sh)
886 add_test(NAME check-externs.sh COMMAND ./check-externs.sh)
887 add_test(NAME check-includes.sh COMMAND ./check-includes.sh)
889 check-c-linkage-decls.sh check-header-guards.sh check-externs.sh check-includes.sh