From ef84976d556bc5ff20040f1e11980798cf7815e9 Mon Sep 17 00:00:00 2001
From: open-license-manager <rillf@maildrop.cc>
Date: 周五, 08 8月 2014 15:34:25 +0800
Subject: [PATCH] build linux

---
 CMakeLists.txt |   33 +++++++++++++--------------------
 1 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46a4e1f..e9e4051 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,9 +12,9 @@
 SET(CMAKE_DISABLE_SOURCE_CHANGES OFF)
 SET(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
 
-
 SET(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "CMake verbose" FORCE)
 
+project (license++ C CXX)
 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/modules/")
 
@@ -38,7 +38,6 @@
 	ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
 endif(WIN32)
 
-project (license++ C CXX)
 
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
   SET(HAVE_64BIT_SIZE_T 1)
@@ -47,18 +46,14 @@
 endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
 set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
 
-#find_package(CryptoPP REQUIRED)
-#include_directories(${CRYPTOPP_INCLUDE_DIRS})
-#link_directories ( ${Boost_LIBRARY_DIRS} )
-
-
+#TODO: determine target arch.
+SET( TargetArchitecture "X86_64")
 SET(Boost_USE_STATIC_LIBS ON)
+include(add_boost)
 # static runtime requires /MT 
 #SET(Boost_USE_MULTITHREADED ON) #SET(Boost_USE_STATIC_RUNTIME OFF)
 #find_package(Boost COMPONENTS thread date_time program_options filesystem system regex unit_test_framework)
-find_package(Boost COMPONENTS date_time program_options filesystem system unit_test_framework)
-#include_directories(${Boost_INCLUDE_DIRS})
-#link_directories ( ${Boost_LIBRARY_DIRS} )
+#find_package(Boost COMPONENTS date_time program_options filesystem system unit_test_framework)
 
 
 if(NOT WIN32)	
@@ -110,16 +105,14 @@
 
 add_subdirectory(src)
 
-#test are done with boost_tests:disable them if boost not found.
-IF(Boost_FOUND)
-	ENABLE_TESTING()
-	INCLUDE(CTest)
-	IF(BUILD_TESTING)
-	  SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
-	  MARK_AS_ADVANCED(BUILDNAME)
-	ENDIF(BUILD_TESTING)
-	add_subdirectory(test)
-ENDIF(Boost_FOUND)
+ENABLE_TESTING()
+INCLUDE(CTest)
+IF(BUILD_TESTING)
+  SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
+  MARK_AS_ADVANCED(BUILDNAME)
+ENDIF(BUILD_TESTING)
+add_subdirectory(test)
+
 
 #include(build/modules/CmakeDebugVariables.txt)
 

--
Gitblit v1.9.1