45 lines
1.5 KiB
CMake
45 lines
1.5 KiB
CMake
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/moo-libs.cmake)
|
|
|
|
ADD_DEFINITIONS(-DMOO_COMPILATION -DXDG_PREFIX=_moo_xdg_)
|
|
INCLUDE_DIRECTORIES(${MOO_SOURCE_DIR}/doc)
|
|
|
|
MOO_ADD_GENERATED_FILE(
|
|
${CMAKE_CURRENT_BINARY_DIR}/marshals.stamp
|
|
"${CMAKE_CURRENT_BINARY_DIR}/marshals.c;${CMAKE_CURRENT_BINARY_DIR}/marshals.h"
|
|
COMMAND ${MOO_CMAKE_COMMAND} -P ${MOO_SOURCE_DIR}/moo/genmarshal.cmake
|
|
DEPENDS marshals.list genmarshal.cmake
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
|
|
SET(MOO_XML2H_PY ${MOO_SOURCE_DIR}/moo/xml2h.py)
|
|
SET(MOO_GLADE2C_PY ${MOO_SOURCE_DIR}/moo/glade2c.py)
|
|
|
|
ADD_SUBDIRECTORY(mooutils)
|
|
ADD_SUBDIRECTORY(moolua)
|
|
ADD_SUBDIRECTORY(moofileview)
|
|
ADD_SUBDIRECTORY(mooedit)
|
|
ADD_SUBDIRECTORY(mooapp)
|
|
|
|
IF(WIN32)
|
|
LIST(APPEND MOO_SOURCES moo-dll.c)
|
|
ENDIF(WIN32)
|
|
|
|
IF(MSVC)
|
|
SET(moo_gendef_args)
|
|
IF(MOO_ENABLE_UNIT_TESTS)
|
|
LIST(APPEND moo_gendef_args test)
|
|
ENDIF(MOO_ENABLE_UNIT_TESTS)
|
|
MOO_ADD_GENERATED_FILE(
|
|
${CMAKE_CURRENT_BINARY_DIR}/moo.def.stamp
|
|
${CMAKE_CURRENT_BINARY_DIR}/moo.def
|
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/gendef.py ${CMAKE_CURRENT_BINARY_DIR}/moo.def.tmp ${moo_gendef_args}
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/moo.def.tmp ${CMAKE_CURRENT_BINARY_DIR}/moo.def
|
|
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/moo.def.tmp
|
|
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/moo.def.stamp
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gendef.py
|
|
)
|
|
LIST(APPEND MOO_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/moo.def)
|
|
ENDIF(MSVC)
|
|
|
|
MOO_ADD_LIBRARY(moo)
|