diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/KDE4Macros.cmake | 43 | 
1 files changed, 20 insertions, 23 deletions
| diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index e37eeb32..2bd0581a 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -307,7 +307,7 @@ macro (KDE4_CREATE_HANDBOOK _docbook)           install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \"${_installDest}/common\"  \"${_installDest}/${dirname}/common\" )" )        endif (UNIX)     endif(_installDest) -    +  endmacro (KDE4_CREATE_HANDBOOK) @@ -474,24 +474,21 @@ endmacro (KDE4_INSTALL_ICONS)  # compiled all-in-one.  macro (KDE4_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile )     set(${_filesExcludedFromFinalFile}) -   file(WRITE ${_filenameCPP} "//autogenerated file\n") +   file(WRITE "${_filenameCPP}" "//autogenerated file\n")     foreach (_current_FILE ${ARGN}) -      get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE) +      get_filename_component(_abs_FILE "${_current_FILE}" ABSOLUTE)        # don't include any generated files in the final-file        # because then cmake will not know the dependencies -      get_source_file_property(_isGenerated ${_abs_FILE} GENERATED) +      get_source_file_property(_isGenerated "${_abs_FILE}" GENERATED)        if (_isGenerated) -         list(APPEND ${_filesExcludedFromFinalFile} ${_abs_FILE}) +         list(APPEND ${_filesExcludedFromFinalFile} "${_abs_FILE}")        else (_isGenerated) -         # don't include c-files in the final-file, because they usually come -         # from a 3rd party and as such are not intended to be compiled all-in-one -         string(REGEX MATCH ".+\\.c$" _isCFile ${_abs_FILE}) -         string(REGEX MATCH ".+\\.h$" _isHFile ${_abs_FILE}) -         if (_isCFile OR _isHFile) -            list(APPEND ${_filesExcludedFromFinalFile} ${_abs_FILE}) -         else (_isCFile OR _isHFile) -            file(APPEND ${_filenameCPP} "#include \"${_abs_FILE}\"\n") -         endif (_isCFile OR _isHFile) +         # only put C++ files in the final-file +         if("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") +            file(APPEND "${_filenameCPP}" "#include \"${_abs_FILE}\"\n") +         else("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") +            list(APPEND ${_filesExcludedFromFinalFile} "${_abs_FILE}") +         endif("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$")        endif (_isGenerated)     endforeach (_current_FILE) @@ -765,7 +762,7 @@ macro (KDE4_ADD_UNIT_TEST _test_NAME)          add_test( ${_targetName} ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME} )      endif (using_qtest AND KDE4_TEST_OUTPUT STREQUAL "xml") -#    add_test( ${_targetName} ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME} -xml -o ${_test_NAME}.tml )  +#    add_test( ${_targetName} ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME} -xml -o ${_test_NAME}.tml )      if (NOT MSVC_IDE)   #not needed for the ide          # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests @@ -943,21 +940,21 @@ macro (KDE4_CREATE_HTML_HANDBOOK _docbook)  endmacro (KDE4_CREATE_HTML_HANDBOOK) -# adds application icon to target source list  -# 'outfiles' - specifies the list of source files  -# 'pattern'  - regular expression for searching application icons  +# adds application icon to target source list +# 'outfiles' - specifies the list of source files +# 'pattern'  - regular expression for searching application icons  # example: KDE4_ADD_WIN32_APP_ICON(myapp_sources "pics/cr*-myapp.png")  macro (KDE4_ADD_WIN32_APP_ICON outfiles pattern)      if (WIN32)          #if (NOT PNG2ICO_EXECUTABLE) -        #    find_executable(PNG2ICO_EXECUTABLE  +        #    find_executable(PNG2ICO_EXECUTABLE          #endif (NOT PNG2ICO_EXECUTABLE)          file(GLOB files  "${pattern}")          MESSAGE(${files})          FOREACH (it ${files})              GET_FILENAME_COMPONENT(_name ${it} NAME_WE) -            #exclude 22'er icons, they does not fix into ico format  +            #exclude 22'er icons, they does not fix into ico format              if (it MATCHES ".*22-.*")              else(it MATCHES ".*22-.*")                  set (_icons "${_icons} ${it}") @@ -967,18 +964,18 @@ macro (KDE4_ADD_WIN32_APP_ICON outfiles pattern)          # png2ico is located in the recommended kdewin32 package          MESSAGE("png2ico ${_outfilename}.ico ${_icons}")          EXEC_PROGRAM(png2ico -                 ARGS ${_outfilename}.ico ${_icons}  +                 ARGS ${_outfilename}.ico ${_icons}          )  #        does not work for unkwown reason  #        add_custom_command(OUTPUT ${_outfilename}.ico  #            COMMAND c:/Programme/kdewin-msvc/bin/png2ico.exe -#            ARGS ${_outfilename}.ico ${_icons}  +#            ARGS ${_outfilename}.ico ${_icons}  #            DEPENDS ${_icons}  #        )          file(WRITE ${_outfilename}.rc "IDI_ICON1        ICON        DISCARDABLE    \"${_outfilename}.ico\"\n")          if (MINGW)              add_custom_command(OUTPUT ${_outfilename}_res.o -                COMMAND windres  +                COMMAND windres                  ARGS -i ${_outfilename}.rc -o ${_outfilename}_res.o --include-dir=${CMAKE_CURRENT_SOURCE_DIR}                  DEPENDS ${_outfilename}.ico ${_outfilename}.rc              ) | 
