BUG: don't include MacroLibrary.cmake, but add a cmake module which implements ADD_FILE_DEPENDENCIES()
ENH: mark the variables from FindPNG.cmake as advanced Alex
This commit is contained in:
parent
cfe124500f
commit
a980fdc96a
|
@ -0,0 +1,16 @@
|
||||||
|
# - ADD_FILE_DEPENDENCIES(source_file depend_files...)
|
||||||
|
# Adds the given files as dependencies to source_file
|
||||||
|
#
|
||||||
|
|
||||||
|
MACRO(ADD_FILE_DEPENDENCIES _file)
|
||||||
|
|
||||||
|
GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS)
|
||||||
|
IF (_deps)
|
||||||
|
SET(_deps ${_deps} ${ARGN})
|
||||||
|
ELSE (_deps)
|
||||||
|
SET(_deps ${ARGN})
|
||||||
|
ENDIF (_deps)
|
||||||
|
|
||||||
|
SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
|
||||||
|
|
||||||
|
ENDMACRO(ADD_FILE_DEPENDENCIES)
|
|
@ -24,8 +24,7 @@ IF(ZLIB_FOUND)
|
||||||
PATHS /usr/lib /usr/local/lib
|
PATHS /usr/lib /usr/local/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
IF (PNG_LIBRARY)
|
IF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
|
||||||
IF (PNG_PNG_INCLUDE_DIR)
|
|
||||||
# png.h includes zlib.h. Sigh.
|
# png.h includes zlib.h. Sigh.
|
||||||
SET(PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
|
SET(PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
|
||||||
SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
|
SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
|
||||||
|
@ -39,7 +38,8 @@ IF(ZLIB_FOUND)
|
||||||
ENDIF(BUILD_SHARED_LIBS)
|
ENDIF(BUILD_SHARED_LIBS)
|
||||||
ENDIF (CYGWIN)
|
ENDIF (CYGWIN)
|
||||||
|
|
||||||
ENDIF (PNG_PNG_INCLUDE_DIR)
|
ENDIF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
|
||||||
ENDIF (PNG_LIBRARY)
|
|
||||||
|
|
||||||
ENDIF(ZLIB_FOUND)
|
ENDIF(ZLIB_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#neundorf@kde.org
|
#neundorf@kde.org
|
||||||
|
|
||||||
INCLUDE(MacroLibrary)
|
INCLUDE(AddFileDependencies)
|
||||||
|
|
||||||
#create the kidl and skeletion file for dcop stuff
|
#create the kidl and skeletion file for dcop stuff
|
||||||
#usage: KDE_ADD_COP_SKELS(foo_SRCS ${dcop_headers})
|
#usage: KDE_ADD_COP_SKELS(foo_SRCS ${dcop_headers})
|
||||||
|
@ -226,7 +226,7 @@ MACRO(KDE3_AUTOMOC)
|
||||||
DEPENDS ${_header}
|
DEPENDS ${_header}
|
||||||
)
|
)
|
||||||
|
|
||||||
MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
|
ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
|
||||||
|
|
||||||
ENDFOREACH (_current_MOC_INC)
|
ENDFOREACH (_current_MOC_INC)
|
||||||
ENDIF(_match)
|
ENDIF(_match)
|
||||||
|
|
Loading…
Reference in New Issue