little cleanup

This commit is contained in:
Yevgen Muntyan 2010-02-27 20:46:13 -08:00
parent 50f88b5ac2
commit 4090e2cbbe
2 changed files with 9 additions and 143 deletions

View File

@ -11,6 +11,14 @@ IF(NOT PYTHONINTERP_FOUND)
MESSAGE(FATAL_ERROR "Python not found")
ENDIF(NOT PYTHONINTERP_FOUND)
IF(WIN32 AND NOT MSVC)
FIND_PROGRAM(WINDRES_EXECUTABLE windres
DOC "Path to the windres executable")
IF(NOT WINDRES_EXECUTABLE)
MESSAGE(FATAL_ERROR "Could not find windres")
ENDIF(NOT WINDRES_EXECUTABLE)
ENDIF(WIN32 AND NOT MSVC)
SET(MOO_CMAKE_COMMAND "${CMAKE_COMMAND}"
-D "MOO_SOURCE_DIR=${MOO_SOURCE_DIR}"
-D "MOO_BINARY_DIR=${MOO_BINARY_DIR}"
@ -20,64 +28,6 @@ SET(MOO_CMAKE_COMMAND "${CMAKE_COMMAND}"
-D "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
)
# ##########################################################################
# #
# # Code modules, automake-style
# #
#
# MACRO(_MOO_MODULE_SOURCES_VAR_NAMES module out_sources_var out_builtsources_var out_stamps_var)
# STRING(TOUPPER ${module} _moo_module_cap)
# SET(${out_sources_var} ${_moo_module_cap}_SOURCES)
# SET(${out_builtsources_var} ${_moo_module_cap}_BUILT_SOURCES)
# SET(${out_stamps_var} ${_moo_module_cap}_STAMPS)
# ENDMACRO(_MOO_MODULE_SOURCES_VAR_NAMES)
#
# MACRO(_MOO_ALL_MODULE_SOURCES module outvar)
# _MOO_MODULE_SOURCES_VAR_NAMES(${module} _moo_s _moo_bs _moo_st)
# SET(${outvar} ${${_moo_s}} ${${_moo_bs}} ${${_moo_st}})
# ENDMACRO(_MOO_ALL_MODULE_SOURCES)
#
# MACRO(MOO_GENERATE_SOURCE_FILE module)
# MOO_COLLECT_ARGS(ARG OUTPUT _moo_output
# ARG COMMAND _moo_command
# ARG WORKING_DIRECTORY _moo_working_directory
# ARG DEPENDS _moo_depends
# ARGN ${ARGN})
#
# SET(_moo_output_tmp ${_moo_output})
# FOREACH(_moo_f IN LISTS _moo_output_tmp)
# ENDFOREACH(_moo_f)
# GET_FILENAME_COMPONENT(VarName FileName
# PATH|ABSOLUTE|NAME|EXT|NAME_WE|REALPATH
# [CACHE])
#
# # FOREACH(_moo_arg ${ARGN})
# # IF("${_moo_arg}" STREQUAL "OUTPUT")
# # SET(_moo_what OUTPUT)
# # ELSEIF("${_moo_arg}" STREQUAL "COMMAND")
# # SET(_moo_what COMMAND)
# # ELSEIF("${_moo_arg}" STREQUAL "COMMAND")
# #
# # IF(_moo_what EQUAL 0)
# #
# # ENDIF(_moo_what EQUAL 0)
# # ENDFOREACH(_moo_arg)
# #
# # FOREACH(_moo_f ${stampfile} ${outputfiles})
# # GET_FILENAME_COMPONENT(_moo_d ${_moo_f} ABSOLUTE)
# # GET_FILENAME_COMPONENT(_moo_d ${_moo_d} PATH)
# # FILE(MAKE_DIRECTORY ${_moo_d})
# # ENDFOREACH(_moo_f)
# # ADD_CUSTOM_COMMAND(OUTPUT ${stampfile} ${ARGN})
# # _MOO_MODULE_SOURCES_VAR_NAMES(${module} _moo_s _moo_bs _moo_st)
# # LIST(APPEND ${_moo_st} ${stampfile})
# # SET_SOURCE_FILES_PROPERTIES(${stampfile} PROPERTIES EXTERNAL_OBJECT 1 GENERATED 1)
# # LIST(APPEND ${_moo_bs} ${outputfiles})
# # SET_SOURCE_FILES_PROPERTIES(${outputfiles} PROPERTIES GENERATED 1)
# # MOO_ADD_CLEAN_FILES(${stampfile} ${outputfiles})
# ENDMACRO(MOO_GENERATE_SOURCE_FILE)
CONFIGURE_FILE(${MOO_SOURCE_DIR}/moo/glade2c.cmake.in ${CMAKE_BINARY_DIR}/moo/glade2c.cmake @ONLY)
MACRO(MOO_GEN_GXML)
FOREACH(_mgg_gladefile ${ARGN})
@ -127,44 +77,4 @@ MACRO(MOO_GEN_UIXML)
ENDFOREACH(uifile)
ENDMACRO(MOO_GEN_UIXML)
# MACRO(MOO_ADD_LIBRARY libname)
# _MOO_ALL_MODULE_SOURCES(${libname} _moo_all_sources)
# ADD_LIBRARY(${libname} ${ARGN} ${STAMPS})
# ENDMACRO(MOO_ADD_LIBRARY)
# MACRO(MOO_MAKE_SOURCE_FILES outvar)
# SET(${outvar})
# FOREACH(f ${ARGN})
# GET_FILENAME_COMPONENT(f ${f} ABSOLUTE)
# LIST(APPEND ${outvar} ${f})
# ENDFOREACH(f)
# ENDMACRO(MOO_MAKE_SOURCE_FILES)
# MACRO(MOO_GET_ARGS outvar1 sep1 outvar2)
# SET(${outvar1})
# SET(${outvar2})
# SET(__doing_part2)
# FOREACH(arg ${ARGN})
# IF(${__doing_part2})
# LIST(APPEND ${outvar2} ${arg})
# ELSEIF("${arg}" STREQUAL "${sep1}")
# SET(__doing_part2 1)
# ELSE(${__doing_part2})
# LIST(APPEND ${outvar1} ${arg})
# ENDIF(${__doing_part2})
# ENDFOREACH(arg)
# ENDMACRO(MOO_GET_ARGS)
# MACRO(MOO_SUBDIR_NAME outvar)
# STRING(LENGTH "${CMAKE_BINARY_DIR}" _moo_top_len)
# STRING(LENGTH "${CMAKE_CURRENT_BINARY_DIR}" _moo_total_len)
# IF(${_moo_top_len} EQUAL ${_moo_total_len})
# SET(${outvar} ".")
# ELSE(${_moo_top_len} EQUAL ${_moo_total_len})
# MATH(EXPR _moo_sub_len "${_moo_total_len} - ${_moo_top_len} - 1")
# MATH(EXPR _moo_top_len "${_moo_top_len} + 1")
# STRING(SUBSTRING "${CMAKE_CURRENT_BINARY_DIR}" ${_moo_top_len} ${_moo_sub_len} ${outvar})
# ENDIF(${_moo_top_len} EQUAL ${_moo_total_len})
# ENDMACRO(MOO_SUBDIR_NAME)
# -%- indent-width:2 -%-

View File

@ -3,28 +3,6 @@ IF(GDK_X11)
LIST(APPEND MOO_DEP_LIBS ${X11_LIBRARIES} ${X11_ICE_LIB})
ENDIF(GDK_X11)
# if test x$MOO_OS_DARWIN = xyes; then
# _moo_ac_have_carbon=no
# AC_MSG_CHECKING([for Mac OS X Carbon support])
# AC_TRY_CPP([
# #include <Carbon/Carbon.h>
# #include <CoreServices/CoreServices.h>
# ],[
# _moo_ac_have_carbon=yes
# AC_DEFINE(HAVE_CARBON, 1, [Mac OS X Carbon])
# LDFLAGS="$LDFLAGS -framework Carbon"
# ])
# AC_MSG_RESULT([$_moo_ac_have_carbon])
# fi
# if $GDK_QUARTZ; then
# PKG_CHECK_MODULES(IGE_MAC,ige-mac-integration)
# GTK_CFLAGS="$IGE_MAC_CFLAGS"
# GTK_LIBS="$IGE_MAC_LIBS"
# LDFLAGS="$LDFLAGS -framework Cocoa"
# fi
INCLUDE(CheckFunctionExists)
INCLUDE(CheckIncludeFile)
INCLUDE(CheckStructHasMember)
@ -63,8 +41,6 @@ MOO_CHECK_HEADERS(sys/utsname.h)
# for mooapp.c
MOO_CHECK_HEADERS(signal.h)
MOO_CHECK_FUNCTIONS(signal)
# for mdfileops.c
MOO_CHECK_FUNCTIONS(link fchown fchmod)
# for mooutils-fs.c
MOO_CHECK_HEADERS(sys/wait.h)
@ -82,24 +58,4 @@ IF(WIN32)
MOO_DEFINE_H(MOO_NEED_GETTIMEOFDAY)
ENDIF(WIN32)
IF(WIN32 AND NOT MSVC)
FIND_PROGRAM(WINDRES_EXECUTABLE windres
DOC "Path to the windres executable")
IF(NOT WINDRES_EXECUTABLE)
MESSAGE(FATAL_ERROR "Could not find windres")
ENDIF(NOT WINDRES_EXECUTABLE)
ENDIF(WIN32 AND NOT MSVC)
# dnl _MOO_AC_CHECK_TOOL(variable,program)
# AC_DEFUN([_MOO_AC_CHECK_TOOL],[
# AC_ARG_VAR([$1], [$2 program])
# AC_PATH_PROG([$1], [$2], [])
# AM_CONDITIONAL([HAVE_$1],[ test "x$2" != "x" ])
# ])
#
# AC_DEFUN_ONCE([MOO_AC_CHECK_TOOLS],[
# _MOO_AC_CHECK_TOOL([GDK_PIXBUF_CSOURCE], [gdk-pixbuf-csource])
# _MOO_AC_CHECK_TOOL([], [glib-genmarshal])
# _MOO_AC_CHECK_TOOL([], [glib-mkenums])
# _MOO_AC_CHECK_TOOL([TXT2TAGS], [txt2tags])
# ])
# -%- indent-width:2 -%-