77 lines
2.1 KiB
CMake
77 lines
2.1 KiB
CMake
#################################
|
|
# Project
|
|
##############
|
|
|
|
#################################
|
|
# Dependencies
|
|
##############
|
|
|
|
configure_file(
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/nw.ini.cmake"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/nwserv.conf"
|
|
IMMEDIATE @ONLY)
|
|
|
|
#################################
|
|
# Compiler Switches
|
|
##############
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${CMAKE_SOURCE_DIR}/include
|
|
${CMAKE_BINARY_DIR}/include
|
|
)
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
add_definitions(
|
|
-DLINUX -D_GNU_SOURCE -Dsignal=__sysv_signal
|
|
)
|
|
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
|
|
add_definitions(
|
|
-D_VERS_H_=\"${VERSION_MAJOR}\"
|
|
-D_VERS_L_=\"${VERSION_MINOR}\"
|
|
-D_VERS_P_=\"${VERSION_PATCH}\"
|
|
)
|
|
|
|
#################################
|
|
# Source Files
|
|
##############
|
|
|
|
|
|
#SET (include_src
|
|
# cbmcopy.h
|
|
# d64copy.h
|
|
# opencbm.h
|
|
# )
|
|
|
|
|
|
add_executable( comm comm.c )
|
|
add_executable( sendm sendm.c )
|
|
add_executable( unxcomm unxcomm.c )
|
|
add_executable( unxsendm unxsendm.c )
|
|
# add_executable( xsockrt xsockrt.c )
|
|
|
|
#################################
|
|
# Linking
|
|
##############
|
|
|
|
#################################
|
|
# Install Files
|
|
##############
|
|
|
|
#install(FILES ${include_src} DESTINATION ${INCLUDE_INSTALL_DIR})
|
|
install(FILES nwserv.conf DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR})
|
|
install(FILES nwserv.stations DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR})
|
|
install(FILES nw.ini.cnv.437 DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR}/nwserv.cnv.437)
|
|
install(FILES nw.ini.cnv.cyr DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR}/nwserv.cnv.cyr)
|
|
install(FILES nw.ini.cnv.min DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR}/nwserv.cnv.min)
|
|
install(FILES nwopt DESTINATION ${MARS_NWE_INSTALL_FULL_FILEDIR}/SYS/.nwopt.vol)
|
|
install(FILES nwopt DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/skel/.nwopt)
|
|
|
|
install(TARGETS comm DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
|
install(TARGETS sendm DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
|
install(TARGETS unxcomm DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
|
install(TARGETS unxsendm DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
|
# install(TARGETS xsockrt DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
|
|