diff options
| author | Nick Drobchenko <xepecine@gmail.com> | 2011-07-05 15:12:43 +0000 |
|---|---|---|
| committer | Nick <xepecine@gmail.com> | 2011-07-05 15:12:43 +0000 |
| commit | 4d613dc583b96ea9205cd06f229956d6ec56c9e6 (patch) | |
| tree | 4ef65b8843a4ee4f05c4895643f8abb0a63602a5 /CMakeScripts/HelperMacros.cmake | |
| parent | Extensions. Perspective. use transform elements if present (Bug 168942) (diff) | |
| download | inkscape-4d613dc583b96ea9205cd06f229956d6ec56c9e6.tar.gz inkscape-4d613dc583b96ea9205cd06f229956d6ec56c9e6.zip | |
Gcodetools have been upgraded to v. 1.7.
(bzr r10417)
Diffstat (limited to 'CMakeScripts/HelperMacros.cmake')
| -rw-r--r-- | CMakeScripts/HelperMacros.cmake | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/CMakeScripts/HelperMacros.cmake b/CMakeScripts/HelperMacros.cmake index cdb4d0386..7cd2333bc 100644 --- a/CMakeScripts/HelperMacros.cmake +++ b/CMakeScripts/HelperMacros.cmake @@ -1,65 +1,65 @@ -# A macro to replace slashes and spaces in a string with underscores
-macro(SANITIZE_PATH _string_var)
- string(REGEX REPLACE "[\\/ ]+" "_" ${_string_var} ${${_string_var}})
-endmacro()
-
-
-macro(inkscape_source_group
- sources)
-
- # Group by location on disk
- source_group("Source Files" FILES CMakeLists.txt)
-
- foreach(_SRC ${sources})
- get_filename_component(_SRC_EXT ${_SRC} EXT)
- if((${_SRC_EXT} MATCHES ".h") OR (${_SRC_EXT} MATCHES ".hpp"))
- source_group("Header Files" FILES ${_SRC})
- else()
- source_group("Source Files" FILES ${_SRC})
- endif()
- endforeach()
-
- unset(_SRC)
- unset(_SRC_EXT)
-endmacro()
-
-
-# only MSVC uses SOURCE_GROUP
-macro(add_inkscape_lib
- name
- sources)
-
- add_library(${name} ${sources})
-
- # works fine without having the includes
- # listed is helpful for IDE's (QtCreator/MSVC)
- inkscape_source_group("${sources}")
-
-endmacro()
-
-
-# A macro to append to the global source property
-set_property(GLOBAL PROPERTY inkscape_global_SRC "")
-
-macro (add_inkscape_source
- sources)
-
- foreach(_SRC ${ARGV})
- get_filename_component(_ABS_SRC ${_SRC} ABSOLUTE)
- set_property(GLOBAL APPEND PROPERTY inkscape_global_SRC ${_ABS_SRC})
- endforeach()
- unset(_SRC)
- unset(_ABS_SRC)
-endmacro()
-
-# A macro to append to the global source property
-macro (add_inkscape_library
- sources)
-
- foreach(_SRC ${ARGV})
- get_filename_component(_ABS_SRC ${_SRC} ABSOLUTE)
- set_property(GLOBAL APPEND PROPERTY inkscape_global_SRC ${_ABS_SRC})
- endforeach()
- unset(_SRC)
- unset(_ABS_SRC)
-endmacro()
+# A macro to replace slashes and spaces in a string with underscores +macro(SANITIZE_PATH _string_var) + string(REGEX REPLACE "[\\/ ]+" "_" ${_string_var} ${${_string_var}}) +endmacro() + + +macro(inkscape_source_group + sources) + + # Group by location on disk + source_group("Source Files" FILES CMakeLists.txt) + + foreach(_SRC ${sources}) + get_filename_component(_SRC_EXT ${_SRC} EXT) + if((${_SRC_EXT} MATCHES ".h") OR (${_SRC_EXT} MATCHES ".hpp")) + source_group("Header Files" FILES ${_SRC}) + else() + source_group("Source Files" FILES ${_SRC}) + endif() + endforeach() + + unset(_SRC) + unset(_SRC_EXT) +endmacro() + + +# only MSVC uses SOURCE_GROUP +macro(add_inkscape_lib + name + sources) + + add_library(${name} ${sources}) + + # works fine without having the includes + # listed is helpful for IDE's (QtCreator/MSVC) + inkscape_source_group("${sources}") + +endmacro() + + +# A macro to append to the global source property +set_property(GLOBAL PROPERTY inkscape_global_SRC "") + +macro (add_inkscape_source + sources) + + foreach(_SRC ${ARGV}) + get_filename_component(_ABS_SRC ${_SRC} ABSOLUTE) + set_property(GLOBAL APPEND PROPERTY inkscape_global_SRC ${_ABS_SRC}) + endforeach() + unset(_SRC) + unset(_ABS_SRC) +endmacro() + +# A macro to append to the global source property +macro (add_inkscape_library + sources) + + foreach(_SRC ${ARGV}) + get_filename_component(_ABS_SRC ${_SRC} ABSOLUTE) + set_property(GLOBAL APPEND PROPERTY inkscape_global_SRC ${_ABS_SRC}) + endforeach() + unset(_SRC) + unset(_ABS_SRC) +endmacro() |
