mirror of
https://github.com/anope/anope.git
synced 2026-07-07 09:43:13 +02:00
Implemented dependency calculation within CMake, now header file dependencies are no longer hardcoded.
Also a few minor changes to the CMakeLists.txt files. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1840 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+18
-15
@@ -35,21 +35,24 @@ foreach(SRC ${MODULES_SRCS})
|
||||
#)
|
||||
#add_custom_target(modules_${SO_TARGET} DEPENDS ${BUILD_DIR}/${SO})
|
||||
#add_dependencies(modules modules_${SO_TARGET})
|
||||
set(HEADERS ${Anope_SOURCE_DIR}/include/module.h)
|
||||
if(${SRC}_HEADERS)
|
||||
foreach(HEADER ${${SRC}_HEADERS})
|
||||
string(SUBSTRING ${HEADER} 0 1 FIRST_CHAR)
|
||||
string(SUBSTRING ${HEADER} 1 1 SECOND_CHAR)
|
||||
if(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":")
|
||||
set(HEADERS ${HEADERS} ${HEADER})
|
||||
else(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":")
|
||||
set(HEADERS ${HEADERS} ${Anope_SOURCE_DIR}/include/${HEADER})
|
||||
endif(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":")
|
||||
endforeach(HEADER)
|
||||
endif(${SRC}_HEADERS)
|
||||
if(HEADERS)
|
||||
set_source_files_properties(${SRC} PROPERTIES OBJECT_DEPENDS "${HEADERS}")
|
||||
endif(HEADERS)
|
||||
#set(HEADERS ${Anope_SOURCE_DIR}/include/module.h)
|
||||
#if(${SRC}_HEADERS)
|
||||
# foreach(HEADER ${${SRC}_HEADERS})
|
||||
# string(SUBSTRING ${HEADER} 0 1 FIRST_CHAR)
|
||||
# string(SUBSTRING ${HEADER} 1 1 SECOND_CHAR)
|
||||
# if(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":")
|
||||
# set(HEADERS ${HEADERS} ${HEADER})
|
||||
# else(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":")
|
||||
# set(HEADERS ${HEADERS} ${Anope_SOURCE_DIR}/include/${HEADER})
|
||||
# endif(FIRST_CHAR STREQUAL "/" OR SECOND_CHAR STREQUAL ":")
|
||||
# endforeach(HEADER)
|
||||
#endif(${SRC}_HEADERS)
|
||||
#if(HEADERS)
|
||||
# set_source_files_properties(${SRC} PROPERTIES OBJECT_DEPENDS "${HEADERS}")
|
||||
#endif(HEADERS)
|
||||
calculate_depends(${SRC})
|
||||
get_source_file_property(HEADERS ${SRC} OBJECT_DEPENDS)
|
||||
message(STATUS "${SRC}'s OBJECT_DEPENDS: ${HEADERS}")
|
||||
if(WIN32 AND MSVC)
|
||||
set(SRC ${SRC} ${Anope_SOURCE_DIR}/src/win32_memory.cpp)
|
||||
endif(WIN32 AND MSVC)
|
||||
|
||||
Reference in New Issue
Block a user