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)
104 add_definitions(-DHAVE_${definition_to_add})
114 add_definitions(-DHAVE_UNISTD_H)
118 add_definitions(-DHAVE_SYS_MMAN_H)
122 add_definitions(-DHAVE_XLOCALE_H)
126 add_definitions(-DHAVE_STDBOOL_H)
131 add_definitions(-wd4244 -wd4267 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS)
139 # #set (HB_VERSION_H "${PROJECT_SOURCE_DIR}/src/hb-version.h")
189 string(REGEX MATCH "\\[(([0-9]+)\\.([0-9]+)\\.([0-9]+))\\]" HB_VERSION_MATCH ${CONFIGUREAC})
211 add_definitions(-DHAVE_FREETYPE=1)
213 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h)
223 add_definitions(-DHAVE_GRAPHITE2)
230 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-graphite2.h)
238 add_definitions(-DHAVE_GLIB)
242 pkg_check_modules(PC_GLIB QUIET glib-2.0)
244 find_library(GLIB_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS})
245 …R} ${PC_LIBRARY_DIRS} ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0/include)
246 …NCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0)
250 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h)
258 add_definitions(-DHAVE_ICU)
262 pkg_check_modules(PC_ICU QUIET icu-uc)
269 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-icu.h)
278 add_definitions(-DHAVE_CORETEXT)
280 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-coretext.h)
311 add_definitions(-DHAVE_GDI)
312 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-gdi.h)
317 add_definitions(-DHAVE_UNISCRIBE)
318 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-uniscribe.h)
323 add_definitions(-DHAVE_DIRECTWRITE)
324 list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-directwrite.h)
331 # Use the hints from glib-2.0.pc to find glib-mkenums
333 pkg_check_modules(PC_GLIB QUIET glib-2.0)
334 find_program(GLIB_MKENUMS glib-mkenums
342 # first determine whether glib-mkenums is a Python or PERL
344 execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${GLIB_MKENUMS}" --version
352 execute_process(COMMAND "${PERL_EXECUTABLE}" "${GLIB_MKENUMS}" --version
361 message(FATAL_ERROR "Unable to determine type of glib-mkenums script")
368 …message(FATAL_ERROR "HB_HAVE_GOBJECT was set, but we failed to find glib-mkenums, which is require…
371 pkg_check_modules(PC_GOBJECT QUIET gobject-2.0)
373 find_library(GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS})
374 …_path(GOBJECT_INCLUDE_DIR NAMES glib-object.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} …
379 list(APPEND hb_gobject_sources ${PROJECT_SOURCE_DIR}/src/hb-gobject-structs.cc)
381 ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc
384 ${PROJECT_SOURCE_DIR}/src/hb-gobject-structs.h
387 ${PROJECT_SOURCE_DIR}/src/hb-gobject.h
391 ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h
395 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h
397 --template=${PROJECT_SOURCE_DIR}/src/hb-gobject-enums.h.tmpl
398 --identifier-prefix hb_
399 --symbol-prefix hb_gobject
402 > ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h.tmp
404 "-DENUM_INPUT_SRC=${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h.tmp"
405 "-DENUM_OUTPUT_SRC=${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h"
406 -P ${PROJECT_SOURCE_DIR}/replace-enum-strings.cmake
407 DEPENDS ${PROJECT_SOURCE_DIR}/src/hb-gobject-enums.h.tmpl
413 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc
415 --template=${PROJECT_SOURCE_DIR}/src/hb-gobject-enums.cc.tmpl
416 --identifier-prefix hb_
417 --symbol-prefix hb_gobject
420 > ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc.tmp
422 "-DENUM_INPUT_SRC=${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc.tmp"
423 "-DENUM_OUTPUT_SRC=${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.cc"
424 -P ${PROJECT_SOURCE_DIR}/replace-enum-strings.cmake
425 DEPENDS ${PROJECT_SOURCE_DIR}/src/hb-gobject-enums.cc.tmpl
426 ${CMAKE_CURRENT_BINARY_DIR}/src/hb-gobject-enums.h
444 add_definitions(-DHAVE_INTEL_ATOMIC_PRIMITIVES)
460 add_definitions(-DHAVE_SOLARIS_ATOMIC_OPS)
468 ## Define harfbuzz-subset library
470 add_library(harfbuzz-subset ${subset_project_sources} ${subset_project_headers})
471 add_dependencies(harfbuzz-subset harfbuzz)
472 target_link_libraries(harfbuzz-subset harfbuzz ${THIRD_PARTY_LIBS})
475 set_target_properties(harfbuzz harfbuzz-subset PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)
482 CHECK_CXX_COMPILER_FLAG(-Bsymbolic-functions CXX_SUPPORTS_FLAG_BSYMB_FUNCS)
484 link_libraries(-Bsymbolic-functions)
489 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions")
494 set_target_properties(harfbuzz-subset PROPERTIES LINKER_LANGUAGE C)
498 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")
501 CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
503 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
510 ## Define harfbuzz-gobject library
512 add_library(harfbuzz-gobject
519 add_dependencies(harfbuzz-gobject harfbuzz)
520 target_link_libraries(harfbuzz-gobject harfbuzz ${GOBJECT_LIBRARIES} ${THIRD_PARTY_LIBS})
523 set_target_properties(harfbuzz-gobject PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)
528 add_definitions("-DHB_DLL_EXPORT")
531 # On Windows, g-ir-scanner requires a DLL build in order for it to work
541 pkg_check_modules(PC_GI QUIET gobject-introspection-1.0)
543 find_program(G_IR_SCANNER g-ir-scanner
547 find_program(G_IR_COMPILER g-ir-compiler
564 set (hb_libpath "$<TARGET_FILE_DIR:harfbuzz-gobject>")
567 # Get the CFlags that we used to build HarfBuzz/HarfBuzz-GObject
570 list(APPEND hb_defines_cflags "-D${hb_cflag}")
573 # Get the other dependent libraries we used to build HarfBuzz/HarfBuzz-GObject
578 list(APPEND extra_libs "--extra-library=${extra_lib_stripped}")
592 # otherwise g-ir-scanner won't like it and give us a bunch
595 STRING(SUBSTRING "${f}" 1 -1 path)
596 if (drive MATCHES "[A-Z]")
614 TARGET harfbuzz-gobject
617 --warn-all --no-libtool --verbose
618 -n hb
619 --namespace=HarfBuzz
620 --nsversion=0.0
621 --identifier-prefix=hb_
622 --include GObject-2.0
623 --pkg-export=harfbuzz
624 --cflags-begin
625 -I${PROJECT_SOURCE_DIR}/src
626 -I${PROJECT_BINARY_DIR}/src
629 -DHB_H
630 -DHB_H_IN
631 -DHB_OT_H
632 -DHB_OT_H_IN
633 -DHB_AAT_H
634 -DHB_AAT_H_IN
635 -DHB_GOBJECT_H
636 -DHB_GOBJECT_H_IN
637 -DHB_EXTERN=
638 --cflags-end
639 --library=harfbuzz-gobject
640 --library=harfbuzz
641 -L${hb_libpath}
643 --filelist ${CMAKE_CURRENT_BINARY_DIR}/src/hb_gir_list
644 -o ${hb_libpath}/HarfBuzz-0.0.gir
645 DEPENDS harfbuzz-gobject harfbuzz ${CMAKE_CURRENT_BINARY_DIR}/src/hb_gir_list
649 TARGET harfbuzz-gobject
652 --verbose --debug
653 --includedir ${CMAKE_CURRENT_BINARY_DIR}
654 ${hb_libpath}/HarfBuzz-0.0.gir
655 -o ${hb_libpath}/HarfBuzz-0.0.typelib
656 DEPENDS ${hb_libpath}/HarfBuzz-0.0.gir harfbuzz-gobject
684 add_definitions("-DPACKAGE_NAME=\"HarfBuzz\"")
685 add_definitions("-DPACKAGE_VERSION=\"${HB_VERSION}\"")
688 add_executable(hb-view ${HB_VIEW_sources})
689 target_link_libraries(hb-view harfbuzz ${CAIRO_LIBRARIESNAMES})
691 add_executable(hb-shape ${HB_SHAPE_sources})
692 target_link_libraries(hb-shape harfbuzz)
694 add_executable(hb-subset ${HB_SUBSET_CLI_sources})
695 target_link_libraries(hb-subset harfbuzz harfbuzz-subset)
697 add_executable(hb-ot-shape-closure ${HB_OT_SHAPE_CLOSURE_sources})
698 target_link_libraries(hb-ot-shape-closure harfbuzz)
728 install(TARGETS harfbuzz-subset
732 install(TARGETS hb-view
735 install(TARGETS hb-subset
739 install(TARGETS hb-shape
743 install(TARGETS hb-ot-shape-closure
748 install(TARGETS harfbuzz-gobject
757 set (hb_libpath "$<TARGET_FILE_DIR:harfbuzz-gobject>")
760 install(FILES "${hb_libpath}/HarfBuzz-0.0.gir"
761 DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gir-1.0
764 install(FILES "${hb_libpath}/HarfBuzz-0.0.typelib"
765 DESTINATION ${CMAKE_INSTALL_LIBDIR}/girepository-1.0
773 …foreach (prog main test test-gsub-would-substitute test-gpos-size-params test-buffer-serialize tes…
777 set (prog_name test-test)
782 # set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
789 …COMMAND "${PYTHON_EXECUTABLE}" ${PROJECT_SOURCE_DIR}/src/gen-def.py ${PROJECT_BINARY_DIR}/harfbuzz…
792 add_test(NAME check-static-inits.sh
793 COMMAND ${PROJECT_SOURCE_DIR}/src/check-static-inits.sh
796 add_test(NAME check-libstdc++.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-libstdc++.sh)
797 add_test(NAME check-symbols.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-symbols.sh)
800 check-static-inits.sh check-libstdc++.sh check-symbols.sh
806 add_test(NAME check-c-linkage-decls.sh COMMAND ./check-c-linkage-decls.sh)
807 add_test(NAME check-header-guards.sh COMMAND ./check-header-guards.sh)
808 add_test(NAME check-externs.sh COMMAND ./check-externs.sh)
809 add_test(NAME check-includes.sh COMMAND ./check-includes.sh)
811 check-c-linkage-decls.sh check-header-guards.sh check-externs.sh check-includes.sh