dfhack/shmserver/CMakeLists.txt

50 lines
1016 B
CMake

# don't use this file directly. use the one in the root folder of the project
SET(PROJECT_HDRS
shms.h
)
SET(PROJECT_SRCS
shms-proto.cpp
)
SET(PROJECT_HDRS_LINUX
)
SET(PROJECT_HDRS_WINDOWS
)
SET(PROJECT_SRCS_LINUX
shms-linux.cpp
)
SET(PROJECT_SRCS_WINDOWS
shms-windows.cpp
)
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)
SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE )
LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS})
IF(UNIX)
2010-01-04 20:04:42 -07:00
add_definitions(-DLINUX_BUILD)
SET(PROJECT_LIBS rt)
2010-02-25 15:43:37 -07:00
SET(CMAKE_CXX_FLAGS "-fvisibility=hidden")
2010-01-04 20:04:42 -07:00
ADD_LIBRARY(dfconnect SHARED ${PROJECT_SRCS})
TARGET_LINK_LIBRARIES(dfconnect ${PROJECT_LIBS})
ELSE(UNIX)
2010-01-04 20:04:42 -07:00
# SET(PROJECT_LIBS psapi)
ADD_LIBRARY(SDL SHARED ${PROJECT_SRCS})
TARGET_LINK_LIBRARIES(SDL ${PROJECT_LIBS})
ENDIF(UNIX)