Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Bård Skaflestad 2013-08-08 10:23:04 +02:00
commit bbfa910773
3 changed files with 13 additions and 3 deletions

View File

@ -38,7 +38,13 @@ macro (opm_compile opm)
# pre-compile common headers; this is setup *after* the library to pick
# up extra options set there
if (PRECOMPILE_HEADERS)
get_target_property (_type ${${opm}_TARGET} TYPE)
# if we have no library, then use the static setting as this will
# build the same way as any test programs (no -fPIC option)
if (${opm}_TARGET)
get_target_property (_type ${${opm}_TARGET} TYPE)
else ()
set (_type "STATIC")
endif ()
precompile_header (CXX ${_type}
HEADER "${${opm}_PRECOMP_CXX_HEADER}"
TARGET ${opm}_CXX_pch

View File

@ -225,7 +225,9 @@ opm_doc (${project} ${doxy_dir})
# provide compatibility with using this build in dunecontrol
include (DuneCompat)
include (LibtoolArchives)
configure_la (${project} ${${project}_TARGET} ${project}_LIBTOOL_ARCHIVE)
if (${project}_TARGET)
configure_la (${project} ${${project}_TARGET} ${project}_LIBTOOL_ARCHIVE)
endif ()
### clean in-source builds ###
include (OpmDistClean)

View File

@ -46,7 +46,9 @@ else ()
# the target above gets built every time thanks to the "ALL" modifier,
# but it must also be done before the main library so it can pick up
# any changes it does.
add_dependencies (${${project}_TARGET} update-version)
if (${project}_TARGET)
add_dependencies (${${project}_TARGET} update-version)
endif ()
endif ()
endif ()