CMakeLists.txt
becdbfac
 cmake_minimum_required (VERSION 3.0)
 
a922c37d
 # use C, because otherwise a CXX compiler is required
 project( mulle-bootstrap C)
becdbfac
 
 #
470b3d4b
 # Primarily used for packaging on Linux
 #
 # Debian:
becdbfac
 #
 # ```
 # mkdir package
 # cd package
 # cmake ..
 # cpack -G DEB
 # ```
 #
 
 execute_process( COMMAND ./mulle-bootstrap version
                  WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
                  OUTPUT_VARIABLE MULLE_BOOTSTRAP_VERSION
                  OUTPUT_STRIP_TRAILING_WHITESPACE)
 message( STATUS "MULLE_BOOTSTRAP_VERSION is ${MULLE_BOOTSTRAP_VERSION} according to mulle-bootstrap")
 
 
 set( PROJECT_VERSION "${MULLE_BOOTSTRAP_VERSION}")
 
 
 set( SCRIPTS
 mulle-bootstrap
 mulle-bootstrap-dotdump
 )
 
57935531
 
 if(MINGW)
    set( SCRIPTS
 ${SCRIPTS}
 mulle-mingw-cmake.sh
 mulle-mingw-make.sh
 mulle-mingw-cpp.sh
 mulle-mingw-dumpdef.sh*
 )
 
 #
91a31f14
 # Todo need to preprocess this to replace paths
57935531
 #
    set( BATS
 mulle-mingw-dumpdef.bat
 )
 
 endif()
 
 
 
becdbfac
 set( LIBRARY_SCRIPTS
 src/mulle-bootstrap-array.sh
 src/mulle-bootstrap-auto-update.sh
 src/mulle-bootstrap-brew.sh
 src/mulle-bootstrap-build.sh
 src/mulle-bootstrap-clean.sh
 src/mulle-bootstrap-command.sh
 src/mulle-bootstrap-common-settings.sh
af39ec54
 src/mulle-bootstrap-core-options.sh
becdbfac
 src/mulle-bootstrap-copy.sh
 src/mulle-bootstrap-defer.sh
 src/mulle-bootstrap-dependency-resolve.sh
 src/mulle-bootstrap-fetch.sh
 src/mulle-bootstrap-functions.sh
 src/mulle-bootstrap-gcc.sh
 src/mulle-bootstrap-init.sh
 src/mulle-bootstrap-local-environment.sh
 src/mulle-bootstrap-logging.sh
 src/mulle-bootstrap-mingw.sh
 src/mulle-bootstrap-mv-force.sh
 src/mulle-bootstrap-paths.sh
 src/mulle-bootstrap-project.sh
 src/mulle-bootstrap-repositories.sh
 src/mulle-bootstrap-scm.sh
 src/mulle-bootstrap-scripts.sh
 src/mulle-bootstrap-settings.sh
 src/mulle-bootstrap-show.sh
 src/mulle-bootstrap-snip.sh
 src/mulle-bootstrap-status.sh
 src/mulle-bootstrap-systeminstall.sh
 src/mulle-bootstrap-tag.sh
 src/mulle-bootstrap-warn-scripts.sh
 src/mulle-bootstrap-xcode.sh
 src/mulle-bootstrap-zombify.sh
 )
 
 INSTALL( FILES ${SCRIPTS}
 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
             GROUP_EXECUTE GROUP_READ
             WORLD_EXECUTE WORLD_READ
 DESTINATION "bin")
 
57935531
 
 INSTALL( FILES ${BATS}
 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
             GROUP_EXECUTE GROUP_READ
             WORLD_EXECUTE WORLD_READ
 DESTINATION "bin")
 
470b3d4b
 #
 # future: install into libexec/mulle-bootstrap/${MULLE_BOOTSTRAP_VERSION}
 #         allows multiple versions to co-exist (does it really ?)
 #
becdbfac
 INSTALL( FILES ${LIBRARY_SCRIPTS}
 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
             GROUP_EXECUTE GROUP_READ
             WORLD_EXECUTE WORLD_READ
 DESTINATION "libexec/mulle-bootstrap")
 
 
 ######
 #
 # must be after CPACK_PACKAGE_VERSION
4bcc3b69
 include( CMakePackage.txt)
becdbfac
 include( CPack)