@@ -442,298 +442,19 @@ if (USE_OSPRAY)
442
442
find_program (M4_EXECUTABLE m4 REQUIRED)
443
443
endif (USE_OSPRAY)
444
444
445
-
446
- ###############################################################################
447
- # Applying patch files cross platform is a challenging problem due to the
448
- # shortage of portable tools and issues with LF vs CRLF files - see
449
- # https://gitlab.kitware.com/cmake/cmake/-/issues/16854 for more background on
450
- # this. We need to address the patch build tool first thing, since any of the
451
- # other ExternalProject_Add builds that follow may depend on it.
452
- ###############################################################################
453
- add_project(patch)
454
-
455
445
###############################################################################
456
- # Although we have bundled flex and bison programs, they can be problematic to
457
- # build - they require working Autotools tool chains (except on Windows where
458
- # we have winflexbison). We therefore attempt these builds only if we need to.
459
- # This check must come after the patch subdirectory, since if we DO add_project
460
- # the flexbison directory it will need the patch executable.
446
+ # There are a lot of individual projects, and their ordering is important. We
447
+ # store them as a separate file.
461
448
###############################################################################
462
- if (USE_APPLESEED OR USE_OSPRAY)
463
-
464
- find_package (FLEX)
465
-
466
- if (NOT FLEX_FOUND)
467
- set (ENABLE_FLEX ON )
468
- endif (NOT FLEX_FOUND)
469
- find_package (BISON)
449
+ include ("${CMAKE_SOURCE_DIR} /dependencies.cmake" )
470
450
471
- if (NOT BISON_FOUND)
472
- set (ENABLE_BISON ON )
473
- endif (NOT BISON_FOUND)
474
-
475
- if (ENABLE_FLEX OR ENABLE_BISON)
476
- add_project(flexbison GROUPS "APPLESEED;OSPRAY" )
477
- endif (ENABLE_FLEX OR ENABLE_BISON)
478
-
479
- # Whether or not we actually added the subdirectories, let subsequent targets
480
- # know we have handled the FLEX and BISON dependencies. Some will list these
481
- # as potential build targets, since we may try to compile them, but as the
482
- # default orientation for these is "build only if we have to" the find
483
- # process itself needs to satisfy the check.
484
- set (FLEX_ADDED 1)
485
- set (BISON_ADDED 1)
486
-
487
- endif (USE_APPLESEED OR USE_OSPRAY)
488
-
489
- ###############################################################################
490
- # Build tools are used during compilation, but are not bundled or distributed
491
- # with binary packages. We group these tools here for convenience. Unlike the
492
- # build targets intended for distribution, these outputs are all
493
- # targeted to the noinstall subdirectory.
494
- ###############################################################################
495
- add_project(astyle GROUPS "BRLCAD" )
496
- add_project(lemon GROUPS "BRLCAD" )
497
- add_project(re2c GROUPS "BRLCAD" )
498
- add_project(perplex GROUPS "BRLCAD" )
499
- add_project(strclear GROUPS "BRLCAD" )
500
- add_project(xmltools GROUPS "BRLCAD_EXTRA" ) # Used for Docbook building
501
-
502
- # RPATH editing - LIEF has the core capabilities, and plief exposes them via
503
- # a command line utility with patchelf compatible options, so we can drop
504
- # either patchelf or plief into our upstream workflows.
505
- add_project(lief GROUPS "BRLCAD" )
506
- add_project(plief GROUPS "BRLCAD" )
507
-
508
- # Keeping this set up for easy turn-on until we're confident plief+LIEF has
509
- # all of our use cases covered - plief is preferred, but we've already hit
510
- # one case where a bug in LIEF had to be fixed.
511
- #add_project(patchelf GROUPS "BRLCAD")
451
+ # Now that we have the dependencies specified, finish the dependencies DOT file
452
+ file (APPEND "${CMAKE_BINARY_DIR} /bext.dot" "\n }\n " )
512
453
513
454
###############################################################################
514
- # Build logic is broken out per-library, but the ordering is important. Some
515
- # libraries will depend on others listed here (for example, we want openNURBS
516
- # to use our bundled zlib if it is enabled.) Developers adding, reordering or
517
- # removing dependencies here need to make sure they are aware of impact they
518
- # may be having on other external projects in other files.
455
+ # Warn the user if the settings changed in a way the indicate there is a risk
456
+ # of now-disabled build products in the output directory
519
457
###############################################################################
520
-
521
- # zlib compression/decompression library
522
- # https://zlib.net
523
- add_project(zlib GROUPS "APPLESEED;BRLCAD;OSPRAY" )
524
-
525
- # zstd - fast lossless compression library
526
- # https://github.com/facebook/zstd
527
- add_project(zstd GROUPS "APPLESEED;OSPRAY" )
528
-
529
- # minizip-ng - zip manipulation library written in C
530
- # https://github.com/zlib-ng/minizip-ng
531
- add_project(minizip-ng GROUPS "APPLESEED" )
532
-
533
- # LZ4 - lossless compression algorithm
534
- # https://github.com/lz4/lz4
535
- add_project(lz4 GROUPS "APPLESEED" )
536
-
537
- # libdeflate fast, whole-buffer DEFLATE-based compression
538
- # https://github.com/ebiggers/libdeflate
539
- add_project(deflate GROUPS "APPLESEED" )
540
-
541
- # fmt - formatting library providing an alternative to C++ iostreams
542
- # https://github.com/fmtlib/fmt
543
- add_project(fmt GROUPS "APPLESEED" )
544
-
545
- # yaml-cpp - YAML parser and emitter in C++ matching the YAML 1.2 spec
546
- # https://github.com/jbeder/yaml-cpp
547
- add_project(yaml-cpp GROUPS "APPLESEED" )
548
-
549
- # pystring - collection of C++ functions which match the interface and behavior
550
- # of python's string class methods
551
- # https://github.com/imageworks/pystring
552
- add_project(pystring GROUPS "APPLESEED" )
553
-
554
- # Henry Spencer's regular expression matching library
555
- # https://github.com/BRL-CAD/regex
556
- add_project(regex GROUPS "BRLCAD" )
557
-
558
- # expat - library for parsing XML 1.0 Fourth Edition
559
- # https://github.com/libexpat/libexpat
560
- add_project(expat GROUPS "APPLESEED" )
561
-
562
- # International Components for Unicode
563
- # https://github.com/unicode-org/icu
564
- add_project(icu GROUPS "APPLESEED" )
565
-
566
- # Xerces-C++ - a validating XML parser
567
- # https://xerces.apache.org/xerces-c/
568
- add_project(xerces-c GROUPS "APPLESEED" )
569
-
570
- # Boost - C++ libraries
571
- # https://www.boost.org
572
- # https://github.com/boostorg/boost
573
- add_project(boost GROUPS "APPLESEED" )
574
-
575
- # netpbm library - support for pnm,ppm,pbm, etc. image files
576
- # http://netpbm.sourceforge.net/
577
- add_project(netpbm GROUPS "BRLCAD" )
578
-
579
- # libjpeg-turbo - JPEG image codec
580
- # https://github.com/libjpeg-turbo/libjpeg-turbo
581
- add_project(jpeg GROUPS "APPLESEED;GDAL" )
582
-
583
- # libpng - Portable Network Graphics image file support
584
- # http://www.libpng.org/pub/png/libpng.html
585
- add_project(png GROUPS "APPLESEED;BRLCAD" )
586
-
587
- # libtiff - Tag Image File Format (TIFF) support
588
- # https://libtiff.gitlab.io/libtiff/
589
- # https://gitlab.com/libtiff/libtiff
590
- add_project(tiff GROUPS "APPLESEED;GDAL" )
591
-
592
- # OpenEXR - EXR image storage format
593
- # https://openexr.com/
594
- # https://github.com/AcademySoftwareFoundation/openexr
595
- add_project(openexr GROUPS "APPLESEED" )
596
-
597
- # UtahRLE - Raster Image library
598
- # https://github.com/BRL-CAD/utahrle
599
- add_project(utahrle GROUPS "BRLCAD" )
600
-
601
- # OpenColorIO - color management
602
- # https://opencolorio.org
603
- # https://github.com/AcademySoftwareFoundation/OpenColorIO
604
- # Note - the VFX Reference Platform (https://vfxplatform.com/)
605
- # is a useful reference for what versions to expect elements
606
- # of the rendering pipeline software stack to use/require
607
- add_project(opencolorio GROUPS "APPLESEED" )
608
-
609
- # OpenImageIO - reading and writing images, aimed at VFX studios
610
- # https://github.com/OpenImageIO/oiio
611
- add_project(openimageio GROUPS "APPLESEED" )
612
-
613
- # ncurses - text-based user interfaces library
614
- # https://invisible-island.net/ncurses/
615
- add_project(ncurses GROUPS "OSPRAY" )
616
-
617
- # Linenoise - line editing library
618
- # https://github.com/msteveb/linenoise
619
- add_project(linenoise GROUPS "BRLCAD" )
620
-
621
- # Lightning Memory-Mapped Database
622
- # https://github.com/LMDB/lmdb
623
- add_project(lmdb GROUPS "BRLCAD" )
624
-
625
- # Eigen - linear algebra library
626
- # https://eigen.tuxfamily.org
627
- add_project(eigen GROUPS "BRLCAD;APPLESEED" )
628
-
629
- # oneTBB - Threading Building Blocks
630
- # https://github.com/oneapi-src/oneTBB
631
- add_project(onetbb GROUPS "APPLESEED;OSPRAY" )
632
-
633
- # rkcommon - C++ infrastructure and CMake utilities
634
- # https://github.com/ospray/rkcommon
635
- add_project(rkcommon GROUPS "OSPRAY" )
636
-
637
- # LLVM - code generation support
638
- # https://llvm.org/
639
- add_project(llvm GROUPS "APPLESEED;OSPRAY" )
640
-
641
- # ISPC - Implicit SPMD Program Compiler
642
- # https://ispc.github.io
643
- # https://github.com/ispc/ispc
644
- add_project(ispc GROUPS "OSPRAY" )
645
-
646
- # STEPcode - support for reading and writing STEP files
647
- # https://github.com/stepcode/stepcode
648
- add_project(stepcode GROUPS "BRLCAD_EXTRA" )
649
-
650
- # SQLITE3 - embeddable database
651
- # https://www.sqlite.org
652
- add_project(sqlite3 GROUPS "GDAL" )
653
-
654
- # PROJ - generic coordinate transformation
655
- # https://proj.org
656
- add_project(proj GROUPS "GDAL" )
657
-
658
- # GDAL - translator library for raster and vector geospatial data formats
659
- # https://gdal.org
660
- add_project(gdal GROUPS "GDAL" )
661
-
662
- # pugixml - a light-weight C++ XML processing library
663
- # https://pugixml.org/
664
- add_project(pugixml GROUPS "BRLCAD;APPLESEED" )
665
-
666
- # Open Asset Import Library - library for supporting I/O for a number of
667
- # Geometry file formats
668
- # https://github.com/assimp/assimp
669
- add_project(assetimport GROUPS "BRLCAD" )
670
-
671
- # OpenCV - Open Source Computer Vision Library
672
- # http://opencv.org
673
- add_project(opencv GROUPS "BRLCAD_EXTRA" )
674
-
675
- # OpenMesh Library - library for representing and manipulating polygonal meshes
676
- # https://www.graphics.rwth-aachen.de/software/openmesh/
677
- add_project(openmesh GROUPS "BRLCAD_EXTRA" )
678
-
679
- # Manifold Library - used for performing boolean ops on meshes
680
- # https://github.com/elalish/manifold
681
- add_project(manifold GROUPS "BRLCAD" )
682
-
683
- # openNURBS - Non-Uniform Rational BSpline library
684
- # https://github.com/mcneel/opennurbs
685
- add_project(opennurbs GROUPS "BRLCAD" )
686
-
687
- # OSMesa - Off Screen Mesa Rendering Library
688
- # https://github.com/starseeker/osmesa
689
- add_project(osmesa GROUPS "BRLCAD" )
690
-
691
- # Poly2Tri - constrained Delaunay triangulation
692
- # https://github.com/jhasse/poly2tri
693
- add_project(poly2tri GROUPS "BRLCAD" )
694
-
695
- # Geogram - a programming library with geometric algorithms
696
- # https://github.com/BrunoLevy/geogram
697
- add_project(geogram GROUPS "BRLCAD_EXTRA" )
698
-
699
- # Open Shading Language (OSL) - language for programmable shading
700
- # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
701
- #
702
- # TODO - need to check if https://github.com/lexxmark/winflexbison will
703
- # work for Windows for OSL's usage of flex/bison...
704
- add_project(osl GROUPS "APPLESEED" )
705
-
706
- # Embree raytracing kernel
707
- # https://github.com/embree/embree
708
- add_project(embree GROUPS "APPLESEED;OSPRAY" )
709
-
710
- # TCL - scripting language. For Tcl/Tk builds we want
711
- # static lib building on so we get the stub libraries.
712
- # https://www.tcl.tk
713
- set (TCL_ENABLE_TK ON CACHE BOOL "enable tk" )
714
- add_project(tcl GROUPS "TCL" )
715
- add_project(tk GROUPS "TCL" )
716
- add_project(itcl GROUPS "TCL" )
717
- add_project(itk GROUPS "TCL" )
718
- add_project(iwidgets GROUPS "TCL" )
719
- add_project(tkhtml GROUPS "TCL" )
720
- add_project(tktable GROUPS "TCL" )
721
-
722
- # Qt - cross-platform user interface/application development toolkit
723
- # https://download.qt.io/archive/qt
724
- add_project(qt GROUPS "QT" )
725
-
726
- # Appleseed - global illumination rendering engine
727
- # https://github.com/appleseedhq/appleseed
728
- add_project(appleseed GROUPS "APPLESEED" )
729
-
730
- # OSPRay - ray tracing engine
731
- # https://github.com/ospray/OSPRay
732
- add_project(ospray GROUPS "OSPRAY" )
733
-
734
-
735
- # Warn the user if the settings changed in a way the indicate there is
736
- # a risk of now-disabled build products in the output directory
737
458
if (EXISTS "${CMAKE_BUNDLE_INSTALL_PREFIX} " AND STALE_INSTALL_WARN)
738
459
file (GLOB OFILES_BIN LIST_DIRECTORIES TRUE ${CMAKE_BUNDLE_INSTALL_PREFIX} /bin/* )
739
460
file (GLOB OFILES_LIB LIST_DIRECTORIES TRUE ${CMAKE_BUNDLE_INSTALL_PREFIX} /lib/* )
@@ -742,17 +463,17 @@ if (EXISTS "${CMAKE_BUNDLE_INSTALL_PREFIX}" AND STALE_INSTALL_WARN)
742
463
endif (OFILES_BIN OR OFILES_LIB)
743
464
endif (EXISTS "${CMAKE_BUNDLE_INSTALL_PREFIX} " AND STALE_INSTALL_WARN)
744
465
745
- # Close out dependencies DOT file
746
- file (APPEND "${CMAKE_BINARY_DIR} /bext.dot" "\n }\n " )
747
-
748
- message ("Output directory: ${CMAKE_INSTALL_PREFIX} /${BEXT_ROOT} " )
749
-
750
- #---------------------------------------------------------------------
751
- # On Windows, if we get dlls built for the wrong configuration it can
752
- # cause problems. Define a utility target to check
466
+ ###############################################################################
467
+ # On Windows, if we get dlls built for the wrong configuration it can cause
468
+ # problems. Define a utility target to check
469
+ ###############################################################################
753
470
add_custom_target (dllcheck
754
471
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=\"$<CONFIG>\" -DDLL_DIR=\"${CMAKE_INSTALL_PREFIX} /bext_output/install /bin\" -P ${CMAKE_SOURCE_DIR} /CMake/DllTypeCheck.cmake)
755
472
473
+ ###############################################################################
474
+ # Report where we will be putting our output
475
+ ###############################################################################
476
+ message ("Output directory: ${CMAKE_INSTALL_PREFIX} /${BEXT_ROOT} " )
756
477
757
478
# Local Variables:
758
479
# tab-width: 8
0 commit comments