Skip to content
Snippets Groups Projects
build.xml 1.95 KiB
Newer Older
  • Learn to ignore specific revisions
  • <?xml version="1.0" encoding="UTF-8"?>
    
    <project name="IpaacaCpp"  default="dist">
    
       <import file="../../../hmibuild/build.xml" />
    
       <target name="check-proto-files">
          <echo message="Checking whether compiled protobuf files are already present..." />
    
    Ramin Yaghoubzadeh's avatar
    Ramin Yaghoubzadeh committed
          <available file="build/ipaaca/ipaaca.pb.h" property="pb.present"/>
    
       <target name="-proto-yes" depends="check-proto-files" if="pb.present">
          <echo message="Built protobuf files found, skipping compilation" />
       </target>
       <target name="-proto-no" depends="check-proto-files" unless="pb.present">
          <echo message="Compiling protobuf files" />
    
          <mkdir dir="${build.dir}/ipaaca" />
    
          <exec executable="protoc">
             <arg value="--proto_path=../proto" />
             <arg value="../proto/ipaaca.proto" />
             <arg value="--cpp_out=build/ipaaca/" />
          </exec>
      </target>
    
       <target name="-pre-compilation" depends="-proto-yes,-proto-no" />
    
       <target name="-compilation" depends="-build-setup, -pre-compilation">
          <!-- echo message="Using temporary RSBProtocol_DIR=${cmake.base.dir}/rsc_tmp/share/rsbprotocol0.10" / -->
          <cmake srcdir="${cmake.base.dir}"
             bindir="${build.dir}"
             buildtype="Debug">
    
             <generator name="Visual Studio 14" platform="windows" buildargs="ALL_BUILD.vcxproj">
                 <variable name="CMAKE_INSTALL_PREFIX" type="PATH" value="../${zip.tmp.dir}" />
             </generator>
    
             <generator name="Visual Studio 10" platform="windows" buildargs="ALL_BUILD.vcxproj">
                 <variable name="CMAKE_INSTALL_PREFIX" type="PATH" value="../${zip.tmp.dir}" />
             </generator>
    
             <generator name="Unix Makefiles">
                 <variable name="CMAKE_INSTALL_PREFIX" type="PATH" value="" />
             </generator>
    
             <variable name="SPREAD_ROOT" type="FILEPATH" value="${env.SPREAD_ROOT}" />
             <variable name="PROTOBUF_ROOT" type="FILEPATH" value="${env.PROTOBUF_ROOT}" />
          </cmake>
       </target>