Commit d91cffcf authored by mr-ti's avatar mr-ti
Browse files

No commit message

No commit message
parent 48cf6932
SET(CMAKE_VERBOSE_MAKEFILE FALSE)
SET(CMAKE_INSTALL_PREFIX /usr)
SET(Default_Project_WC_REVISION 2)
SET(global_unicomctrl_DEFS -Wall -g3 -D_REENTRANT)
IF(NOT WIN32)
EXECUTE_PROCESS(COMMAND uname -s OUTPUT_VARIABLE SYSTEM_NAME)
IF("${SYSTEM_NAME}" STREQUAL "Linux\n")
SET(LINUX TRUE)
ENDIF("${SYSTEM_NAME}" STREQUAL "Linux\n")
IF("${SYSTEM_NAME}" STREQUAL "FreeBSD\n")
SET(FREEBSD TRUE)
ENDIF("${SYSTEM_NAME}" STREQUAL "FreeBSD\n")
ENDIF(NOT WIN32)
IF(NOT WIN32)
FIND_PROGRAM(SVN_PATH svn /usr/bin /usr/local/bin)
IF(DEFINED SVN_PATH)
EXECUTE_PROCESS(COMMAND ${SVN_PATH} info --xml WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE project_WC_INFO_XML ERROR_VARIABLE project_ERRORS)
IF(project_ERRORS STREQUAL "")
STRING(REGEX REPLACE "(.*)<entry(.*)revision=\"(.*)\">(.*)" "\\3" project_WC_REVISION "${project_WC_INFO_XML}")
ENDIF(project_ERRORS STREQUAL "")
ENDIF(DEFINED SVN_PATH)
ENDIF(NOT WIN32)
IF(NOT DEFINED project_WC_REVISION)
SET(project_WC_REVISION ${Default_Project_WC_REVISION})
ENDIF(NOT DEFINED project_WC_REVISION)
SET(global_unicomctrl_DEFS ${global_unicomctrl_DEFS} -D_UNI_REVISION="\\"${project_WC_REVISION}\\"" -D_UNI_VERSION="\\"0.7.0a0\\"")
MESSAGE("UniComPlug Project revision ${project_WC_REVISION}")
SUBDIRS(ddnssbase ddnssync)
#SUBDIRS(ddnssbase ddnssync ddnssplugins)
# ### HEAD ###
PROJECT(ddnssbase)
# ### COMMUN ###
SET(ddnssbase_SRCS ddnssbase.cpp)
SET(ddnssbase_LIBS unicomcl)
SET(ddnssbase_DEFS ${global_unicomctrl_DEFS})
SET(ddnssbase_LDFS )
# add " -D_UNI_INTENSIVE_VERBOSE" for more debub message
# ### BODY ###
IF (FREEBSD)
SET(ddnssbase_DEFS ${ddnssbase_DEFS} -I/usr/local/include)
SET(ddnssbase_LDFS ${ddnssbase_LDFS} -L/usr/local/lib)
ENDIF(FREEBSD)
# ### BUILD ###
ADD_DEFINITIONS(${ddnssbase_DEFS})
ADD_LIBRARY(ddnssbase SHARED ${ddnssbase_SRCS})
SET_TARGET_PROPERTIES(ddnssbase PROPERTIES LINK_FLAGS "${ddnssbase_LDFS}")
SET_TARGET_PROPERTIES(ddnssbase PROPERTIES OUTPUT_NAME ddnssbase)
TARGET_LINK_LIBRARIES(ddnssbase ${ddnssbase_LIBS})
# ### INSTALL ###
INSTALL(TARGETS ddnssbase DESTINATION lib PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
# ### HEAD ###
PROJECT(ddnssync)
# ### COMMUN ###
SET(ddnssync_SRCS )
SET(ddnssync_LIBS ddnssbase unicomdb)
SET(ddnssync_DEFS ${global_unicomctrl_DEFS})
SET(ddnssync_LDFS )
# add " -D_UNI_INTENSIVE_VERBOSE" for more debub message
# ### BODY ###
IF (FREEBSD)
SET(ddnssync_DEFS ${ddnssync_DEFS} -I/usr/local/include)
SET(ddnssync_LDFS ${ddnssync_LDFS} -L/usr/local/lib)
ENDIF(FREEBSD)
IF(NOT WIN32)
FIND_LIBRARY(MYSQLCLIENT_LIBRARY mysqlclient)
IF(MYSQLCLIENT_LIBRARY)
SET(ddnssync_DEFS ${ddnssync_DEFS} -D_UNICOMDB_MYSQL)
ENDIF(MYSQLCLIENT_LIBRARY)
FIND_LIBRARY(PQ_LIBRARY pq)
IF(PQ_LIBRARY)
SET(ddnssync_DEFS ${ddnssync_DEFS} -D_UNICOMDB_POSTGRESQL)
ENDIF(PQ_LIBRARY)
FIND_LIBRARY(SQLITE3_LIBRARY sqlite3)
IF(SQLITE3_LIBRARY)
SET(ddnssync_DEFS ${ddnssync_DEFS} -D_UNICOMDB_SQLITE3)
ENDIF(SQLITE3_LIBRARY)
ELSE(NOT WIN32)
SET(ddnssync_DEFS ${ddnssync_DEFS} -D_UNICOMDB_MYSQL -D_UNICOMDB_POSTGRESQL -D_UNICOMDB_SQLITE3)
ENDIF(NOT WIN32)
# ### BUILD ###
ADD_DEFINITIONS(${ddnssync_DEFS})
ADD_EXECUTABLE(ddnssync ${ddnssync_SRCS})
SET_TARGET_PROPERTIES(ddnssync PROPERTIES LINK_FLAGS "${ddnssync_LDFS}")
TARGET_LINK_LIBRARIES(ddnssync ${ddnssync_LIBS})
# ### INSTALL ###
INSTALL(TARGETS ddnssync DESTINATION bin PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment