2009-09-13 18:02:46 -06:00
|
|
|
# don't use this file directly. use the one in the root folder of the project
|
|
|
|
|
2009-10-26 15:50:08 -06:00
|
|
|
SET(PROJECT_HDRS
|
2009-11-10 20:37:28 -07:00
|
|
|
DFCommonInternal.h
|
2009-10-26 15:50:08 -06:00
|
|
|
DFHackAPI.h
|
|
|
|
DFMemInfo.h
|
2009-11-17 19:33:17 -07:00
|
|
|
DFMemInfoManager.h
|
2009-11-16 20:19:13 -07:00
|
|
|
DFProcessEnumerator.h
|
|
|
|
DFProcess.h
|
2009-10-26 15:50:08 -06:00
|
|
|
DFTileTypes.h
|
|
|
|
DFTypes.h
|
|
|
|
DFVector.h
|
2009-12-22 14:19:39 -07:00
|
|
|
DFWindow.h
|
2009-10-26 15:50:08 -06:00
|
|
|
integers.h
|
|
|
|
|
|
|
|
md5/md5.h
|
|
|
|
md5/md5wrapper.h
|
|
|
|
|
|
|
|
tinyxml/tinystr.h
|
|
|
|
tinyxml/tinyxml.h
|
2009-12-22 14:19:39 -07:00
|
|
|
|
2010-02-18 10:31:18 -07:00
|
|
|
gopt/gopt.h
|
|
|
|
|
2010-01-03 22:20:28 -07:00
|
|
|
../shmserver/shms.h
|
2009-10-26 15:50:08 -06:00
|
|
|
)
|
|
|
|
|
2009-09-13 18:02:46 -06:00
|
|
|
SET(PROJECT_SRCS
|
|
|
|
DFMemInfo.cpp
|
2009-11-17 19:33:17 -07:00
|
|
|
DFMemInfoManager.cpp
|
2009-09-13 18:02:46 -06:00
|
|
|
DFHackAPI.cpp
|
|
|
|
DFTileTypes.cpp
|
|
|
|
md5/md5.cpp
|
|
|
|
md5/md5wrapper.cpp
|
|
|
|
tinyxml/tinystr.cpp
|
|
|
|
tinyxml/tinyxml.cpp
|
|
|
|
tinyxml/tinyxmlerror.cpp
|
|
|
|
tinyxml/tinyxmlparser.cpp
|
2010-02-18 10:31:18 -07:00
|
|
|
gopt/gopt.c
|
2009-09-13 18:02:46 -06:00
|
|
|
)
|
|
|
|
|
2009-11-16 20:19:13 -07:00
|
|
|
SET(PROJECT_HDRS_LINUX
|
|
|
|
)
|
|
|
|
|
|
|
|
SET(PROJECT_HDRS_WINDOWS
|
|
|
|
stdint_win.h
|
|
|
|
)
|
|
|
|
|
|
|
|
SET(PROJECT_SRCS_LINUX
|
|
|
|
DFProcess-linux.cpp
|
2009-12-22 14:19:39 -07:00
|
|
|
DFProcess-linux-SHM.cpp
|
2010-02-15 16:04:15 -07:00
|
|
|
DFProcess-linux-wine.cpp
|
2009-12-22 14:19:39 -07:00
|
|
|
DFWindow-linux.cpp
|
2009-11-17 19:33:17 -07:00
|
|
|
DFProcessEnumerator-linux.cpp
|
2009-11-16 20:19:13 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(PROJECT_SRCS_WINDOWS
|
|
|
|
DFProcess-windows.cpp
|
2010-01-10 23:27:59 -07:00
|
|
|
DFProcess-windows-SHM.cpp
|
2009-12-22 14:19:39 -07:00
|
|
|
DFWindow-windows.cpp
|
2009-11-17 19:33:17 -07:00
|
|
|
DFProcessEnumerator-windows.cpp
|
2009-11-16 20:19:13 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
IF(UNIX)
|
|
|
|
LIST(APPEND PROJECT_HDRS ${PROJECT_HDRS_LINUX})
|
|
|
|
LIST(APPEND PROJECT_SRCS ${PROJECT_SRCS_LINUX})
|
|
|
|
ELSE(UNIX)
|
|
|
|
LIST(APPEND PROJECT_HDRS ${PROJECT_HDRS_WINDOWS})
|
|
|
|
LIST(APPEND PROJECT_SRCS ${PROJECT_SRCS_WINDOWS})
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
2009-10-26 15:50:08 -06:00
|
|
|
SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE )
|
|
|
|
|
|
|
|
LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS})
|
|
|
|
|
2009-10-31 12:18:59 -06:00
|
|
|
SET( MEMXML_DATA_PATH . CACHE PATH "search path for Memory.xml")
|
2009-10-29 18:56:40 -06:00
|
|
|
# OPTION( VARIABLE "Description" Initial state)
|
|
|
|
#OPTION( WITH_FOO "Enable FOO support" ON )
|
|
|
|
#OPTION( WITH_BAR "Enable BAR component" OFF )
|
|
|
|
|
|
|
|
|
|
|
|
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/library/config.h.cmake ${CMAKE_SOURCE_DIR}/library/config.h )
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-13 18:02:46 -06:00
|
|
|
IF(UNIX)
|
|
|
|
add_definitions(-DLINUX_BUILD)
|
2009-10-29 18:56:40 -06:00
|
|
|
add_definitions(-DUSE_CONFIG_H)
|
2009-12-12 12:52:30 -07:00
|
|
|
find_library(X11_LIBRARY X11)
|
2009-12-13 14:03:19 -07:00
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -pedantic")
|
|
|
|
|
2009-12-22 14:19:39 -07:00
|
|
|
SET(PROJECT_LIBS ${X11_LIBRARY} rt)
|
2009-09-13 18:02:46 -06:00
|
|
|
ELSE(UNIX)
|
|
|
|
SET(PROJECT_LIBS psapi)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
ADD_LIBRARY(dfhack SHARED ${PROJECT_SRCS})
|
2009-10-23 12:05:42 -06:00
|
|
|
|
2009-12-12 12:52:30 -07:00
|
|
|
SET_TARGET_PROPERTIES(dfhack PROPERTIES DEBUG_POSTFIX "-debug" )
|
2009-10-23 12:05:42 -06:00
|
|
|
|
2009-10-29 18:56:40 -06:00
|
|
|
TARGET_LINK_LIBRARIES(dfhack ${PROJECT_LIBS})
|
|
|
|
|
|
|
|
IF(UNIX)
|
|
|
|
install(TARGETS dfhack LIBRARY DESTINATION lib)
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/output/Memory.xml DESTINATION share/dfhack)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
#install(TARGETS mySharedLib DESTINATION /some/full/path)
|