mirror of
https://github.com/reactos/CMake.git
synced 2024-11-23 11:39:48 +00:00
ENH: fix for optimized debug stuff
This commit is contained in:
parent
ab61137eb1
commit
1b58308b98
@ -565,13 +565,17 @@ IF (QT4_QMAKE_FOUND)
|
||||
SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG})
|
||||
SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG})
|
||||
ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
|
||||
|
||||
|
||||
IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
|
||||
IF(NOT MSVC)
|
||||
SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE})
|
||||
ELSE(NOT MSVC)
|
||||
# if the generator supports configuration types then set
|
||||
# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
|
||||
ENDIF(NOT MSVC)
|
||||
ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
# if there are no configuration types and CMAKE_BUILD_TYPE has no value
|
||||
# then just use the release libraries
|
||||
SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} )
|
||||
ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
|
||||
ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
|
||||
|
||||
|
@ -14,14 +14,7 @@ IF (NOT QT_DONT_USE_QTCORE)
|
||||
IF (QT_QTCORE_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTCORE_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DQT_CORE_LIB)
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTCORE_LIBRARY}"
|
||||
debug "${QT_QTCORE_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTCORE_LIBRARY}" )
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTCORE_LIBRARY})
|
||||
IF (UNIX)
|
||||
IF (CMAKE_DL_LIBS)
|
||||
SET (QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
@ -36,14 +29,7 @@ IF (NOT QT_DONT_USE_QTGUI)
|
||||
IF (QT_QTGUI_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTGUI_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DQT_GUI_LIB)
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTGUI_LIBRARY}"
|
||||
debug "${QT_QTGUI_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTGUI_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTGUI_LIBRARY})
|
||||
IF (UNIX)
|
||||
IF (X11_FOUND)
|
||||
SET (QT_LIBRARIES ${QT_LIBRARIES} ${X11_LIBRARIES})
|
||||
@ -58,14 +44,7 @@ IF (QT_USE_QT3SUPPORT)
|
||||
IF (QT_QT3SUPPORT_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QT3SUPPORT_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DQT3_SUPPORT)
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QT3SUPPORT_LIBRARY}"
|
||||
debug "${QT_QT3SUPPORT_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QT3SUPPORT_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT3SUPPORT_LIBRARY})
|
||||
ELSE (QT_QT3SUPPORT_FOUND)
|
||||
MESSAGE("Qt3Support library not found.")
|
||||
ENDIF (QT_QT3SUPPORT_FOUND)
|
||||
@ -74,14 +53,7 @@ ENDIF (QT_USE_QT3SUPPORT)
|
||||
IF (QT_USE_QTASSISTANT)
|
||||
IF (QT_QTASSISTANT_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTASSISTANT_INCLUDE_DIR})
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTASSISTANT_LIBRARY}"
|
||||
debug "${QT_QTASSISTANT_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTASSISTANT_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTASSISTANT_LIBRARY})
|
||||
ELSE (QT_QTASSISTANT_FOUND)
|
||||
MESSAGE("QtAssistant library not found.")
|
||||
ENDIF (QT_QTASSISTANT_FOUND)
|
||||
@ -90,14 +62,7 @@ ENDIF (QT_USE_QTASSISTANT)
|
||||
IF (QT_USE_QTDESIGNER)
|
||||
IF (QT_QTDESIGNER_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTDESIGNER_INCLUDE_DIR})
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTDESIGNER_LIBRARY}"
|
||||
debug "${QT_QTDESIGNER_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTDESIGNER_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTDESIGNER_LIBRARY})
|
||||
ELSE (QT_QTDESIGNER_FOUND)
|
||||
MESSAGE("QtDesigner library not found.")
|
||||
ENDIF (QT_QTDESIGNER_FOUND)
|
||||
@ -105,28 +70,14 @@ ENDIF (QT_USE_QTDESIGNER)
|
||||
|
||||
IF (QT_USE_QTMAIN)
|
||||
IF (WIN32)
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTMAIN_LIBRARY_RELEASE}"
|
||||
debug "${QT_QTMAIN_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTMAIN_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY})
|
||||
ENDIF (WIN32)
|
||||
ENDIF (QT_USE_QTMAIN)
|
||||
|
||||
IF (QT_USE_QTMOTIF)
|
||||
IF (QT_QTMOTIF_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTMOTIF_INCLUDE_DIR})
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTMOTIF_LIBRARY}"
|
||||
debug "${QT_QTMOTIF_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTMOTIF_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMOTIF_LIBRARY})
|
||||
ELSE (QT_QTMOTIF_FOUND)
|
||||
MESSAGE("QtMotif library not found.")
|
||||
ENDIF (QT_QTMOTIF_FOUND)
|
||||
@ -136,14 +87,7 @@ IF (QT_USE_QTNETWORK)
|
||||
IF (QT_QTNETWORK_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTNETWORK_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DQT_NETWORK_LIB)
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTNETWORK_LIBRARY}"
|
||||
debug "${QT_QTNETWORK_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTNETWORK_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARY})
|
||||
ELSE (QT_QTNETWORK_FOUND)
|
||||
MESSAGE("QtNetwork library not found.")
|
||||
ENDIF (QT_QTNETWORK_FOUND)
|
||||
@ -152,14 +96,7 @@ ENDIF (QT_USE_QTNETWORK)
|
||||
IF (QT_USE_QTNSPLUGIN)
|
||||
IF (QT_QTNSPLUGIN_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTNSPLUGIN_INCLUDE_DIR})
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTNSPLUGIN_LIBRARY}"
|
||||
debug "${QT_QTNSPLUGIN_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTNSPLUGIN_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTNSPLUGIN_LIBRARY})
|
||||
ELSE (QT_QTNSPLUGIN_FOUND)
|
||||
MESSAGE("QtNsPlugin library not found.")
|
||||
ENDIF (QT_QTNSPLUGIN_FOUND)
|
||||
@ -169,14 +106,7 @@ IF (QT_USE_QTOPENGL)
|
||||
IF (QT_QTOPENGL_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTOPENGL_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DQT_OPENGL_LIB)
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTOPENGL_LIBRARY}"
|
||||
debug "${QT_QTOPENGL_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTOPENGL_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY})
|
||||
ELSE (QT_QTOPENGL_FOUND)
|
||||
MESSAGE("QtOpenGL library not found.")
|
||||
ENDIF (QT_QTOPENGL_FOUND)
|
||||
@ -186,14 +116,7 @@ IF (QT_USE_QTSQL)
|
||||
IF (QT_QTSQL_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTSQL_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DQT_SQL_LIB)
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTSQL_LIBRARY}"
|
||||
debug "${QT_QTSQL_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTSQL_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTSQL_LIBRARY})
|
||||
ELSE (QT_QTSQL_FOUND)
|
||||
MESSAGE("QtSql library not found.")
|
||||
ENDIF (QT_QTSQL_FOUND)
|
||||
@ -203,14 +126,7 @@ IF (QT_USE_QTXML)
|
||||
IF (QT_QTXML_FOUND)
|
||||
INCLUDE_DIRECTORIES(${QT_QTXML_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DQT_XML_LIB)
|
||||
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
||||
optimized "${QT_QTXML_LIBRARY}"
|
||||
debug "${QT_QTXML_LIBRARY_DEBUG}"
|
||||
)
|
||||
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_QTXML_LIBRARY}")
|
||||
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTXML_LIBRARY})
|
||||
ELSE (QT_QTXML_FOUND)
|
||||
MESSAGE("QtXml library not found.")
|
||||
ENDIF (QT_QTXML_FOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user