Fix 'occurred' typo
[bpdyndnsd] / CMakeLists.txt
index c6bae97..c5e119d 100644 (file)
@@ -1,49 +1,15 @@
-
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
 PROJECT(bpdyndnsd)
 
+set(MAJOR_VERSION 1)
+set(MINOR_VERSION 1)
+set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION})
+
 # if you don't want the full compiler output, remove the following line
 SET(CMAKE_VERBOSE_MAKEFILE ON)
 
 # add definitions, compiler switches, etc.
 ADD_DEFINITIONS(-Wall -O2)
 
-# list all source files here
-ADD_EXECUTABLE(bin/bpdyndnsd src/main.cpp)
-
-# find boost_program_options and link to bpdyndnsd
-FIND_LIBRARY( BOOST_PROGRAM_OPTIONS libboost_program_options.so )
-IF(BOOST_PROGRAM_OPTIONS)
-    MESSAGE(STATUS "Found boost/program_options as ${BOOST_PROGRAM_OPTIONS}")
-    TARGET_LINK_LIBRARIES(bin/bpdyndnsd ${BOOST_PROGRAM_OPTIONS})
-ELSE(BOOST_PROGRAM_OPTIONS)
-    MESSAGE(FATAL_ERROR "Could not find boost/program_options")
-ENDIF(BOOST_PROGRAM_OPTIONS)
-
-# find boost_filesystem and link to bpdyndnsd
-FIND_LIBRARY( BOOST_FILESYSTEM libboost_filesystem.so )
-IF(BOOST_FILESYSTEM)
-    MESSAGE(STATUS "Found boost/filesystem as ${BOOST_FILESYSTEM}")
-    TARGET_LINK_LIBRARIES(bin/bpdyndnsd ${BOOST_FILESYSTEM})
-ELSE(BOOST_FILESYSTEM)
-    MESSAGE(FATAL_ERROR "Could not find boost/filesystem")
-ENDIF(BOOST_FILESYSTEM)
-
-# find boost_regex and link to bpdyndnsd
-FIND_LIBRARY( BOOST_REGEX libboost_regex.so )
-IF(BOOST_REGEX)
-    MESSAGE(STATUS "Found boost/regex as ${BOOST_REGEX}")
-    TARGET_LINK_LIBRARIES(bin/bpdyndnsd ${BOOST_REGEX})
-ELSE(BOOST_REGEX)
-    MESSAGE(FATAL_ERROR "Could not find boost/regex")
-ENDIF(BOOST_REGEX)
-
-# find boost_serialization and link to bpdyndnsd
-FIND_LIBRARY( BOOST_SERIALIZATION libboost_serialization.so )
-IF(BOOST_SERIALIZATION)
-    MESSAGE(STATUS "Found boost/serialization as ${BOOST_SERIALIZATION}")
-    TARGET_LINK_LIBRARIES(bin/bpdyndnsd ${BOOST_SERIALIZATION})
-ELSE(BOOST_SERIALIZATION)
-    MESSAGE(FATAL_ERROR "Could not find boost/serialization")
-ENDIF(BOOST_SERIALIZATION)
+add_subdirectory(src)