bld_output.bat 780 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. :: cmd
  2. @echo on
  3. echo "Building %PKG_NAME%."
  4. set CMAKE_CONFIG=Release
  5. :: Isolate the build.
  6. mkdir build_%CMAKE_CONFIG%
  7. pushd build_%CMAKE_CONFIG%
  8. if "%PKG_NAME:~-6%" == "static" (
  9. set CARES_STATIC=ON
  10. set CARES_SHARED=OFF
  11. ) else (
  12. set CARES_STATIC=OFF
  13. set CARES_SHARED=ON
  14. )
  15. :: Generate the build files.
  16. echo "Generating the build files..."
  17. cmake -G"NMake Makefiles" ^
  18. -DCARES_STATIC:BOOL=%CARES_STATIC% ^
  19. -DCARES_SHARED:BOOL=%CARES_SHARED% ^
  20. -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^
  21. -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
  22. "%SRC_DIR%"
  23. :: Build.
  24. echo "Building..."
  25. nmake
  26. if errorlevel 1 exit /b 1
  27. :: Install.
  28. echo "Installing..."
  29. nmake install
  30. if errorlevel 1 exit /b 1
  31. popd
  32. :: Error free exit.
  33. echo "Error free exit!"
  34. exit 0