[Pkg-running-devel] [antpm] 37/48: cmake: build gant as optional

Kristof Ralovich ralovich-guest at moszumanska.debian.org
Mon Aug 11 10:10:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

ralovich-guest pushed a commit to branch upstream
in repository antpm.

commit 18cdcba490d1eb34bbf022dcbc6da02b0064b890
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date:   Tue Apr 8 14:53:45 2014 +0200

    cmake: build gant as optional
    
    remove -lstdc++ from win builds
---
 src/CMakeLists.txt | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c4188bc..be34cd9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,7 +10,11 @@ PROJECT(antpm C CXX)
 OPTION(USE_COVERAGE "use gcov" FALSE)
 OPTION(USE_BOOST_TEST "use boost::test" FALSE)
 OPTION(USE_BOOST_STATIC_LINK "link statically against boost" TRUE)
-
+IF(MSVC)
+  OPTION(USE_GANT "build gant" FALSE)
+ELSE()
+  OPTION(USE_GANT "build gant" TRUE)
+ENDIF()
 
 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
 
@@ -116,6 +120,7 @@ IF(NOT WIN32)
     SerialTty.hpp SerialTty.cpp
 	  )
   SET(Boost_THREAD_LIBRARY "${Boost_THREAD_LIBRARY};pthread")
+  SET(MY_ANTPM_LIBRARIES "stdc++")
 ENDIF()
 
 
@@ -128,7 +133,7 @@ TARGET_LINK_LIBRARIES(antpm
   ${Boost_THREAD_LIBRARY}
   ${Boost_SYSTEM_LIBRARY}
   ${Boost_FILESYSTEM_LIBRARY}
-  stdc++
+  ${MY_ANTPM_LIBRARIES}
 )
 
 ADD_EXECUTABLE(antpm-usbmon2ant
@@ -162,7 +167,9 @@ INSTALL(TARGETS antpm-fit2gpx RUNTIME DESTINATION bin)
 
 add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
 
-ADD_SUBDIRECTORY(gant)
+IF(USE_GANT)
+  ADD_SUBDIRECTORY(gant)
+ENDIF()
 
 # set(CPACK_PACKAGE_VERSION_MAJOR "1")
 # set(CPACK_PACKAGE_VERSION_MINOR "0")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git



More information about the Pkg-running-devel mailing list