MACRO(SET_PROJECT_VERSION)
	set(SN_VERSION_PATCH_STR)
	if(SN_VERSION_PATCH)
		set(SN_VERSION_PATCH_STR ".${SN_VERSION_PATCH}")
	endif()
	set(SN_VERSION "${SN_VERSION_MAJOR}.${SN_VERSION_MINOR}${SN_VERSION_PATCH_STR}")
	message("${PROJECT_NAME} Project version \"${SN_VERSION}\".")
ENDMACRO()


MACRO(GATHER_MODULE_HEADERS)
    set(INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include/${PROJECT_NAME}/${MODULE_NAME}")
	if(DEBUG_LOGS)
		message("Extracting headers from ${INCLUDE_DIR}")
	endif()
	FILE(GLOB_RECURSE HEADERS ${INCLUDE_DIR}/*.h)
	if(DEBUG_LOGS)
		foreach(header ${HEADERS})
			message("  found header: ${header}")
		endforeach()
	endif()
ENDMACRO()


MACRO(GATHER_APP_HEADERS)
    set(INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include/${PROJECT_NAME}/")
	if(DEBUG_LOGS)
		message("Extracting headers from ${INCLUDE_DIR}")
	endif()
	FILE(GLOB_RECURSE HEADERS ${INCLUDE_DIR}/*.h)
	if(DEBUG_LOGS)
		foreach(header ${HEADERS})
			message("  found header: ${header}")
		endforeach()
	endif()
ENDMACRO()


MACRO(GATHER_SOURCES)
    set(SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/src")
	if(DEBUG_LOGS)
		message("Extracting sources from ${SOURCE_DIR}")
	endif()
	FILE(GLOB_RECURSE SOURCES ${SOURCE_DIR}/*.cpp)
	if(DEBUG_LOGS)
		foreach(source ${SOURCES})
			message("  found source: ${source}")
		endforeach()
	endif()
ENDMACRO()


FUNCTION(ADD_DEPENDENCY_MODULE target_name module)
	set(module_library "${PROJECT_NAME}_${module}")
	add_dependencies(${target_name} ${module_library})
	target_link_libraries(${target_name} ${module_library})
ENDFUNCTION()