* All tools:

- Library linking: there must not be "target_link_library()" for libraries,
        only when building binaries. Avoid clashes between static module
        or class variables, and strange reinitialisation of those variables.
    - Change: Boost is now always linked staticly.
This commit is contained in:
Jean-Paul Chaput 2010-07-01 11:59:35 +00:00
parent 31328a6811
commit ff826d31cf
6 changed files with 8 additions and 16 deletions

View File

@ -12,6 +12,8 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -Wall" CACHE STRING "Release options."
FIND_PACKAGE(LibXml2 REQUIRED)
FIND_PACKAGE(PythonSitePackages REQUIRED)
SET(Boost_USE_STATIC_LIBS ON)
MESSAGE(STATUS "Always uses Boost static libraries.")
FIND_PACKAGE(Boost 1.32.0 COMPONENTS program_options filesystem python REQUIRED)
IF (Boost_FOUND)
MESSAGE(STATUS "Found Boost.Python libraries in ${Boost_INCLUDE_DIR} as ${Boost_LIBRARIES}")

View File

@ -24,7 +24,6 @@ IF(Boost_FOUND)
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
PREFIX ""
)
TARGET_LINK_LIBRARIES(pyAGDS agds ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
INSTALL(TARGETS pyAGDS DESTINATION ${PYTHON_SITE_PACKAGES})
ENDIF(Boost_FOUND)

View File

@ -21,7 +21,6 @@ IF(Boost_FOUND)
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
PREFIX ""
)
TARGET_LINK_LIBRARIES(pyCIF cif ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
INSTALL(TARGETS pyCIF DESTINATION ${PYTHON_SITE_PACKAGES})
ENDIF(Boost_FOUND)

View File

@ -27,11 +27,6 @@
qt4_wrap_cpp ( mocCpps ${mocIncludes} )
add_library ( configuration ${cpps} ${mocCpps} )
target_link_libraries ( configuration ${QT_LIBRARIES}
${Boost_LIBRARIES}
${PYTHON_LIBRARIES}
${LIBXML2_LIBRARIES}
)
add_executable ( vlsisapd-conf-editor ${editorcpp} )
target_link_libraries ( vlsisapd-conf-editor configuration ${QT_LIBRARIES}
${Boost_LIBRARIES}

View File

@ -15,13 +15,12 @@ TARGET_LINK_LIBRARIES(dtr ${LIBXML2_LIBRARIES})
INSTALL(TARGETS dtr DESTINATION lib${LIB_SUFFIX})
IF (Boost_FOUND)
ADD_LIBRARY(pyDTR MODULE ${pycpps})
SET_TARGET_PROPERTIES(pyDTR PROPERTIES
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
PREFIX ""
)
TARGET_LINK_LIBRARIES(pyDTR dtr ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
INSTALL(TARGETS pyDTR DESTINATION ${PYTHON_SITE_PACKAGES})
ADD_LIBRARY(pyDTR MODULE ${pycpps})
SET_TARGET_PROPERTIES(pyDTR PROPERTIES
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
PREFIX ""
)
INSTALL(TARGETS pyDTR DESTINATION ${PYTHON_SITE_PACKAGES})
ENDIF(Boost_FOUND)
INSTALL(FILES ${hpps} DESTINATION include/vlsisapd/dtr)

View File

@ -26,8 +26,6 @@ SET ( cpps Circuit.cpp
ADD_LIBRARY(openChams ${cpps})
TARGET_LINK_LIBRARIES(openChams ${LIBXML2_LIBRARIES})
INSTALL(TARGETS openChams DESTINATION lib${LIB_SUFFIX} )
INSTALL(FILES ${includes} DESTINATION include/vlsisapd/openChams)