You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by sh...@apache.org on 2009/07/03 01:04:46 UTC
svn commit: r790756 - /qpid/trunk/qpid/cpp/src/CMakeLists.txt
Author: shuston
Date: Thu Jul 2 23:04:45 2009
New Revision: 790756
URL: http://svn.apache.org/viewvc?rev=790756&view=rev
Log:
Make up-to-date check for generated files look in binary dir. On Windows, don't add Boost libs to link libs; let heders pull them in as needed, and pay attention to the BOOST_ALL_DYN_LINK to allow static build.
Modified:
qpid/trunk/qpid/cpp/src/CMakeLists.txt
Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=790756&r1=790755&r2=790756&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Thu Jul 2 23:04:45 2009
@@ -61,9 +61,9 @@
# If any of the specs, or any of the sources used to generate code, change
# then regenerate the sources.
foreach (spec_file ${specs} ${rgen_progs})
- if (${spec_file} IS_NEWER_THAN src/rubygen.cmake)
+ if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake)
set(regen_amqp ON)
- endif (${spec_file} IS_NEWER_THAN src/rubygen.cmake)
+ endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake)
endforeach (spec_file ${specs})
if (regen_amqp)
message(STATUS "Regenerating AMQP protocol sources")
@@ -79,13 +79,13 @@
set(mgen_dir ${qpid-cpp_SOURCE_DIR}/managementgen)
set(regen_mgmt OFF)
foreach (spec_file ${mgmt_specs})
- if (${spec_file} IS_NEWER_THAN src/managementgen.cmake)
+ if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake)
message(STATUS "${spec_file} is newer")
set(regen_mgmt ON)
- endif (${spec_file} IS_NEWER_THAN src/managementgen.cmake)
+ endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake)
endforeach (spec_file ${mgmt_specs})
if (regen_mgmt)
- message(STATUS, "Regenerating Qpid Management Framework sources")
+ message(STATUS "Regenerating Qpid Management Framework sources")
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c managementgen.cmake -b -q -o ${CMAKE_CURRENT_BINARY_DIR}/gen/qmf ${mgmt_specs}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
else (regen_mgmt)
@@ -155,7 +155,7 @@
message(FATAL_ERROR "Boost C++ libraries not found. Please install or try setting BOOST_ROOT")
endif(NOT Boost_FOUND)
-# Versions of cmake pre 2.6 don´t set the Boost_*_LIBRARY variables correctly
+# Versions of cmake pre 2.6 don't set the Boost_*_LIBRARY variables correctly
# these values are correct for Linux
if (NOT Boost_PROGRAM_OPTIONS_LIBRARY)
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
@@ -173,10 +173,28 @@
set(Boost_REGEX_LIBRARY boost_regex)
endif (NOT Boost_REGEX_LIBRARY)
+# Boost on Windows can use automatic linking to pick up the correct
+# Boost libs based on compile-time touching of the headers. So don't really
+# need to add them to the link lines. But on Windows you can also pick whether
+# the static or dynamic versions of the libs are used; allow this choice to
+# the user.
+if (MSVC)
+ set(Boost_DATE_TIME_LIBRARY "")
+ set(Boost_THREAD_LIBRARY "")
+ set(Boost_PROGRAM_OPTIONS_LIBRARY "")
+ set(Boost_FILESYSTEM_LIBRARY "")
+ set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY "")
+ set(Boost_REGEX_LIBRARY "")
+
+ option(QPID_LINK_BOOST_DYNAMIC "Link with dynamic Boost libs (OFF to link static)" ON)
+ if (QPID_LINK_BOOST_DYNAMIC)
+ add_definitions( /D BOOST_ALL_DYN_LINK)
+ endif (QPID_LINK_BOOST_DYNAMIC)
+endif (MSVC)
+
include_directories( ${Boost_INCLUDE_DIR} )
include_directories( . )
-include_directories( gen )
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/gen)
link_directories( ${Boost_LIBRARY_DIRS} )
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org