TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.3 KiB

  1. #################################################
  2. #
  3. # (C) 2012 Trinity Project
  4. #
  5. # Improvements and feedback are welcome
  6. #
  7. # This file is released under GPL >= 2
  8. #
  9. #################################################
  10. configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/update-entities.sh ${CMAKE_CURRENT_BINARY_DIR}/update-entities IMMEDIATE @ONLY )
  11. set( UPDATE_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/update-entities" )
  12. set( TDEVERSION_FILE "${CMAKE_SOURCE_DIR}/tdecore/tdeversion.h" )
  13. set( ENTITIES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/customization/entities/general.entities" )
  14. if( NOT EXISTS ${UPDATE_SCRIPT} )
  15. tde_message_fatal( "${UPDATE_SCRIPT} not found!\n Check your sources." )
  16. endif( )
  17. if( NOT EXISTS ${TDEVERSION_FILE} )
  18. tde_message_fatal( "${TDEVERSION_FILE} not found!\n Check your sources." )
  19. endif( )
  20. if( NOT EXISTS ${ENTITIES_FILE} )
  21. tde_message_fatal( "${ENTITIES_FILE} not found!\n Check your sources." )
  22. endif( )
  23. execute_process( COMMAND chmod +x ${UPDATE_SCRIPT} )
  24. execute_process(
  25. COMMAND ${UPDATE_SCRIPT}
  26. RESULT_VARIABLE _result
  27. OUTPUT_STRIP_TRAILING_WHITESPACE )
  28. if( _result )
  29. tde_message_fatal( "Unable to update ${ENTITIES_FILE}!\n " )
  30. else( )
  31. message( STATUS "Updated as follows:" )
  32. execute_process( COMMAND echo )
  33. execute_process( COMMAND tail -n3 ${ENTITIES_FILE} )
  34. execute_process( COMMAND echo )
  35. endif( )