Commit d626149d authored by schultezub's avatar schultezub
Browse files

cleaned up CMake files

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@343 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent 8dce44f9
...@@ -38,7 +38,7 @@ IF(CAMPVIS_BUILD_LIB_TGT) ...@@ -38,7 +38,7 @@ IF(CAMPVIS_BUILD_LIB_TGT)
ENDIF() ENDIF()
IF(CAMPVIS_BUILD_LIB_KISSCL) IF(CAMPVIS_BUILD_LIB_KISSCL)
LIST(APPEND CAMPVIS_DEFINITIONS "-DHAS_KISSCL") LIST(APPEND CampvisGlobalDefinitions "-DHAS_KISSCL")
ADD_SUBDIRECTORY(ext/kisscl) ADD_SUBDIRECTORY(ext/kisscl)
ENDIF() ENDIF()
...@@ -58,19 +58,19 @@ ENDIF() ...@@ -58,19 +58,19 @@ ENDIF()
# Copy External DLLs # Copy External DLLs
# #
IF(WIN32) IF(WIN32)
LIST(REMOVE_DUPLICATES CAMPVIS_EXTERNAL_DEBUG_DLLS) LIST(REMOVE_DUPLICATES CampvisExternalDllsDebug)
LIST(REMOVE_DUPLICATES CAMPVIS_EXTERNAL_RELEASE_DLLS) LIST(REMOVE_DUPLICATES CampvisExternalDllsRelease)
IF(CAMPVIS_COPY_EXTERNAL_DLLS) IF(CAMPVIS_COPY_EXTERNAL_DLLS)
COPY_EXTERNAL_DLLS(CAMPVIS_EXTERNAL_DEBUG_DLLS CAMPVIS_EXTERNAL_RELEASE_DLLS false) COPY_EXTERNAL_DLLS(CampvisExternalDllsDebug CampvisExternalDllsRelease false)
ENDIF() ENDIF()
IF(CAMPVIS_ADD_INSTALL_TARGET) IF(CAMPVIS_ADD_INSTALL_TARGET)
INSTALL(FILES ${CAMPVIS_EXTERNAL_DEBUG_DLLS} INSTALL(FILES ${CampvisExternalDllsDebug}
DESTINATION . DESTINATION .
CONFIGURATIONS Debug CONFIGURATIONS Debug
) )
INSTALL(FILES ${CAMPVIS_EXTERNAL_RELEASE_DLLS} INSTALL(FILES ${CampvisExternalDllsRelease}
DESTINATION . DESTINATION .
CONFIGURATIONS Release CONFIGURATIONS Release
) )
......
...@@ -4,21 +4,21 @@ INCLUDE(../cmake/commonconf.cmake) ...@@ -4,21 +4,21 @@ INCLUDE(../cmake/commonconf.cmake)
MESSAGE(STATUS "Configuring CAMPVis Application") MESSAGE(STATUS "Configuring CAMPVis Application")
FILE(GLOB CAMPVIS_APPLICATION_SOURCES FILE(GLOB CampvisApplicationSources
*.cpp *.cpp
gui/*.cpp gui/*.cpp
gui/properties/*.cpp gui/properties/*.cpp
tools/*.cpp tools/*.cpp
) )
FILE(GLOB CAMPVIS_APPLICATION_HEADERS FILE(GLOB CampvisApplicationHeaders
*.h *.h
gui/*.h gui/*.h
gui/properties/*.h gui/properties/*.h
tools/*.h tools/*.h
) )
SET(CAMPVIS_APPLICATION_TO_BE_MOCCED SET(CampvisApplicationToBeMocced
gui/mainwindow.h gui/mainwindow.h
gui/datacontainerinspectorcanvas.h gui/datacontainerinspectorcanvas.h
gui/datacontainerinspectorwidget.h gui/datacontainerinspectorwidget.h
...@@ -42,15 +42,15 @@ SET(CAMPVIS_APPLICATION_TO_BE_MOCCED ...@@ -42,15 +42,15 @@ SET(CAMPVIS_APPLICATION_TO_BE_MOCCED
# #
# Qt related stuff: # Qt related stuff:
# #
FIND_PACKAGE(Qt4 ${CAMPVIS_REQUIRED_QT_VERSION} REQUIRED QtCore QtGui QtOpenGL) FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
QT4_WRAP_CPP(CAMPVIS_APPLICATION_MOC ${CAMPVIS_APPLICATION_TO_BE_MOCCED}) QT4_WRAP_CPP(CampvisApplicationMoc ${CampvisApplicationToBeMocced})
LIST(APPEND CAMPVIS_APPLICATION_SOURCES ${CAMPVIS_APPLICATION_MOC}) LIST(APPEND CampvisApplicationSources ${CampvisApplicationMoc})
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_EXECUTABLE(campvis-application ADD_EXECUTABLE(campvis-application
${CAMPVIS_APPLICATION_SOURCES} ${CAMPVIS_APPLICATION_HEADERS} ${CampvisApplicationSources} ${CampvisApplicationHeaders}
${CAMPVIS_APPLICATION_MOC} ${CampvisApplicationMoc}
) )
ADD_DEFINITIONS(${CAMPVIS_DEFINITIONS} ${QT_DEFINITIONS}) ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CAMPVIS_INCLUDE_DIRECTORIES}) INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-application campvis-core campvis-modules tgt ${CAMPVIS_EXTERNAL_LIBRARIES} ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(campvis-application campvis-core campvis-modules tgt ${CampvisGlobalExternalLibs} ${QT_LIBRARIES})
IF(NOT CommonconfProcessed)
IF(NOT COMMONCONF_PROCESSED) SET(CampvisHome ${CMAKE_CURRENT_SOURCE_DIR})
MESSAGE(STATUS "TUMVis Home: ${CampvisHome}")
SET(CAMPVIS_HOME ${CMAKE_CURRENT_SOURCE_DIR})
MESSAGE(STATUS "TUMVis Home: ${CAMPVIS_HOME}")
# include macros # include macros
INCLUDE(${CAMPVIS_HOME}/cmake/macros.cmake) INCLUDE(${CampvisHome}/cmake/macros.cmake)
# detect compiler and architecture # detect compiler and architecture
IF(${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008") IF(${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008")
...@@ -54,17 +53,17 @@ ENDIF() ...@@ -54,17 +53,17 @@ ENDIF()
# set binary output path # set binary output path
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CAMPVIS_HOME}/bin") SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CampvisHome}/bin")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CAMPVIS_HOME}/bin") SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CampvisHome}/bin")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CAMPVIS_HOME}/bin") SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CampvisHome}/bin")
# common include directories # common include directories
LIST(APPEND CAMPVIS_INCLUDE_DIRECTORIES "${CAMPVIS_HOME}/ext") LIST(APPEND CampvisGlobalIncludeDirs "${CampvisHome}/ext")
LIST(APPEND CAMPVIS_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) LIST(APPEND CampvisGlobalIncludeDirs ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
# platform-dependent configuration # platform-dependent configuration
IF(WIN32) IF(WIN32)
LIST(APPEND CAMPVIS_DEFINITIONS "-DNOMINMAX" "-D_CRT_SECURE_NO_DEPRECATE") LIST(APPEND CampvisGlobalDefinitions "-DNOMINMAX" "-D_CRT_SECURE_NO_DEPRECATE")
# Disable warnings for Microsoft compiler: # Disable warnings for Microsoft compiler:
# C4305: 'identifier' : truncation from 'type1' to 'type2' # C4305: 'identifier' : truncation from 'type1' to 'type2'
...@@ -78,14 +77,14 @@ IF(WIN32) ...@@ -78,14 +77,14 @@ IF(WIN32)
# but is safe there, since the 'this' pointer is only stored and not accessed. # but is safe there, since the 'this' pointer is only stored and not accessed.
# C4390: ';' : empty controlled statement found; is this the intent? # C4390: ';' : empty controlled statement found; is this the intent?
# occurs when OpenGL error logging macros are disabled # occurs when OpenGL error logging macros are disabled
#LIST(APPEND CAMPVIS_DEFINITIONS /wd4305 /wd4800 /wd4290 /wd4068 /wd4251 /wd4355 /wd4390) #LIST(APPEND CampvisGlobalDefinitions /wd4305 /wd4800 /wd4290 /wd4068 /wd4251 /wd4355 /wd4390)
LIST(APPEND CAMPVIS_DEFINITIONS /wd4290 /wd4390) LIST(APPEND CampvisGlobalDefinitions /wd4290 /wd4390)
# enable parallel builds in Visual Studio # enable parallel builds in Visual Studio
LIST(APPEND CAMPVIS_DEFINITIONS /MP) LIST(APPEND CampvisGlobalDefinitions /MP)
# prevent error: number of sections exceeded object file format limit # prevent error: number of sections exceeded object file format limit
LIST(APPEND CAMPVIS_DEFINITIONS /bigobj) LIST(APPEND CampvisGlobalDefinitions /bigobj)
# allows 32 Bit builds to use more than 2GB RAM (VC++ only) # allows 32 Bit builds to use more than 2GB RAM (VC++ only)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
...@@ -93,7 +92,7 @@ IF(WIN32) ...@@ -93,7 +92,7 @@ IF(WIN32)
IF(CAMPVIS_SHARED_LIBS) IF(CAMPVIS_SHARED_LIBS)
# Linking against Windows DLLs requires explicit instantiation of templates # Linking against Windows DLLs requires explicit instantiation of templates
LIST(APPEND CAMPVIS_DEFINITIONS "-DDLL_TEMPLATE_INST") LIST(APPEND CampvisGlobalDefinitions "-DDLL_TEMPLATE_INST")
IF(NOT CAMPVIS_GENERATE_MANIFEST) IF(NOT CAMPVIS_GENERATE_MANIFEST)
# Do not embed manifest into binaries in debug mode (slows down incremental linking) # Do not embed manifest into binaries in debug mode (slows down incremental linking)
...@@ -111,38 +110,38 @@ IF(WIN32) ...@@ -111,38 +110,38 @@ IF(WIN32)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /INCREMENTAL:NO") SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /INCREMENTAL:NO")
ENDIF() ENDIF()
LIST(APPEND CAMPVIS_EXTERNAL_LIBRARIES netapi32 version) LIST(APPEND CampvisGlobalExternalLibs netapi32 version)
ELSEIF(UNIX) ELSEIF(UNIX)
LIST(APPEND CAMPVIS_DEFINITIONS "-DUNIX") LIST(APPEND CampvisGlobalDefinitions "-DUNIX")
LIST(APPEND CAMPVIS_DEFINITIONS "-D__STDC_CONSTANT_MACROS") LIST(APPEND CampvisGlobalDefinitions "-D__STDC_CONSTANT_MACROS")
ENDIF(WIN32) ENDIF(WIN32)
# tgt configuration # tgt configuration
LIST(APPEND CAMPVIS_DEFINITIONS "-DTGT_WITHOUT_DEFINES") # don't use tgt's build system LIST(APPEND CampvisGlobalDefinitions "-DTGT_WITHOUT_DEFINES") # don't use tgt's build system
IF(WIN32) IF(WIN32)
SET(TGT_WITH_WMI TRUE) #< enable Windows Management Instrumentation for hardware detection SET(TGT_WITH_WMI TRUE) #< enable Windows Management Instrumentation for hardware detection
ENDIF() ENDIF()
IF(CAMPVIS_DEBUG) IF(CAMPVIS_DEBUG)
LIST(APPEND CAMPVIS_DEFINITIONS -DTGT_DEBUG -DCAMPVIS_DEBUG) LIST(APPEND CampvisGlobalDefinitions -DTGT_DEBUG -DCAMPVIS_DEBUG)
ENDIF() ENDIF()
# minimum Qt version # minimum Qt version
SET(CAMPVIS_REQUIRED_QT_VERSION "4.8") SET(CampvisRequiredQtVersion "4.8")
# detect libraries # detect libraries
MESSAGE(STATUS "--------------------------------------------------------------------------------") MESSAGE(STATUS "--------------------------------------------------------------------------------")
MESSAGE(STATUS "Detecting Mandatory External Libraries:") MESSAGE(STATUS "Detecting Mandatory External Libraries:")
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CAMPVIS_HOME}/cmake") SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CampvisHome}/cmake")
# OpenGL # OpenGL
FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(OpenGL REQUIRED)
IF(OPENGL_FOUND) IF(OPENGL_FOUND)
MESSAGE(STATUS "* Found OpenGL") MESSAGE(STATUS "* Found OpenGL")
LIST(APPEND CAMPVIS_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR}) LIST(APPEND CampvisGlobalIncludeDirs ${OPENGL_INCLUDE_DIR})
LIST(APPEND CAMPVIS_EXTERNAL_LIBRARIES ${OPENGL_LIBRARIES}) LIST(APPEND CampvisGlobalExternalLibs ${OPENGL_LIBRARIES})
ELSE(OPENGL_FOUND) ELSE(OPENGL_FOUND)
MESSAGE(FATAL_ERROR "OpenGL not found!") MESSAGE(FATAL_ERROR "OpenGL not found!")
ENDIF(OPENGL_FOUND) ENDIF(OPENGL_FOUND)
...@@ -151,12 +150,12 @@ ENDIF(OPENGL_FOUND) ...@@ -151,12 +150,12 @@ ENDIF(OPENGL_FOUND)
FIND_PACKAGE(Glew REQUIRED) FIND_PACKAGE(Glew REQUIRED)
IF(GLEW_FOUND) IF(GLEW_FOUND)
MESSAGE(STATUS "* Found GLEW") MESSAGE(STATUS "* Found GLEW")
LIST(APPEND CAMPVIS_DEFINITIONS ${GLEW_DEFINITIONS}) LIST(APPEND CampvisGlobalDefinitions ${GLEW_DEFINITIONS})
LIST(APPEND CAMPVIS_INCLUDE_DIRECTORIES ${GLEW_INCLUDE_DIR}) LIST(APPEND CampvisGlobalIncludeDirs ${GLEW_INCLUDE_DIR})
LIST(APPEND CAMPVIS_EXTERNAL_LIBRARIES ${GLEW_LIBRARY}) LIST(APPEND CampvisGlobalExternalLibs ${GLEW_LIBRARY})
LIST(APPEND CAMPVIS_EXTERNAL_DEBUG_DLLS ${GLEW_DLL_DEBUG}) LIST(APPEND CampvisExternalDllsDebug ${GLEW_DLL_DEBUG})
LIST(APPEND CAMPVIS_EXTERNAL_RELEASE_DLLS ${GLEW_DLL_RELEASE}) LIST(APPEND CampvisExternalDllsRelease ${GLEW_DLL_RELEASE})
LIST(APPEND CAMPVIS_EXTERNAL_LICENSE_FILES ${GLEW_LICENSE_FILE}) LIST(APPEND CampvisExternalLicenseFiles ${GLEW_LICENSE_FILE})
ELSE(GLEW_FOUND) ELSE(GLEW_FOUND)
MESSAGE(FATAL_ERROR "GLEW not found!") MESSAGE(FATAL_ERROR "GLEW not found!")
ENDIF(GLEW_FOUND) ENDIF(GLEW_FOUND)
...@@ -165,12 +164,12 @@ ENDIF(GLEW_FOUND) ...@@ -165,12 +164,12 @@ ENDIF(GLEW_FOUND)
FIND_PACKAGE(TBB REQUIRED) FIND_PACKAGE(TBB REQUIRED)
IF(TBB_FOUND) IF(TBB_FOUND)
MESSAGE(STATUS "* Found TBB") MESSAGE(STATUS "* Found TBB")
LIST(APPEND CAMPVIS_DEFINITIONS ${TBB_DEFINITIONS}) LIST(APPEND CampvisGlobalDefinitions ${TBB_DEFINITIONS})
LIST(APPEND CAMPVIS_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIR}) LIST(APPEND CampvisGlobalIncludeDirs ${TBB_INCLUDE_DIR})
LIST(APPEND CAMPVIS_EXTERNAL_LIBRARIES ${TBB_LIBRARY}) LIST(APPEND CampvisGlobalExternalLibs ${TBB_LIBRARY})
LIST(APPEND CAMPVIS_EXTERNAL_DEBUG_DLLS ${TBB_DLL_DEBUG}) LIST(APPEND CampvisExternalDllsDebug ${TBB_DLL_DEBUG})
LIST(APPEND CAMPVIS_EXTERNAL_RELEASE_DLLS ${TBB_DLL_RELEASE}) LIST(APPEND CampvisExternalDllsRelease ${TBB_DLL_RELEASE})
LIST(APPEND CAMPVIS_EXTERNAL_LICENSE_FILES ${TBB_LICENSE_FILE}) LIST(APPEND CampvisExternalLicenseFiles ${TBB_LICENSE_FILE})
ELSE(TBB_FOUND) ELSE(TBB_FOUND)
MESSAGE(FATAL_ERROR "TBB not found!") MESSAGE(FATAL_ERROR "TBB not found!")
ENDIF(TBB_FOUND) ENDIF(TBB_FOUND)
...@@ -183,8 +182,8 @@ MESSAGE(STATUS "Detecting Optional External Libraries:") ...@@ -183,8 +182,8 @@ MESSAGE(STATUS "Detecting Optional External Libraries:")
FIND_PACKAGE(CL) FIND_PACKAGE(CL)
IF (OPENCL_FOUND) IF (OPENCL_FOUND)
MESSAGE(STATUS "* Found OpenCL") MESSAGE(STATUS "* Found OpenCL")
LIST(APPEND CAMPVIS_INCLUDE_DIRECTORIES ${OPENCL_INCLUDE_DIR}) LIST(APPEND CampvisGlobalIncludeDirs ${OPENCL_INCLUDE_DIR})
LIST(APPEND CAMPVIS_EXTERNAL_LIBRARIES ${OPENCL_LIBRARY}) LIST(APPEND CampvisGlobalExternalLibs ${OPENCL_LIBRARY})
ELSE(OPENCL_FOUND) ELSE(OPENCL_FOUND)
MESSAGE(STATUS "* Did NOT find OpenCL!") MESSAGE(STATUS "* Did NOT find OpenCL!")
ENDIF(OPENCL_FOUND) ENDIF(OPENCL_FOUND)
...@@ -195,12 +194,11 @@ MESSAGE(STATUS "---------------------------------------------------------------- ...@@ -195,12 +194,11 @@ MESSAGE(STATUS "----------------------------------------------------------------
MESSAGE(STATUS "Detecting installed modules:") MESSAGE(STATUS "Detecting installed modules:")
# collect list of directories in modules directories # collect list of directories in modules directories
SET(ModulesDir ${CAMPVIS_HOME}/modules) SET(ModulesDir ${CampvisHome}/modules)
LIST_SUBDIRECTORIES(ModDirs ${ModulesDir} false) LIST_SUBDIRECTORIES(ModDirs ${ModulesDir} false)
# remove CMake realted directories # remove CMake and SVN realated directories from list
LIST(REMOVE_ITEM ModDirs CMakeFiles) LIST(REMOVE_ITEM ModDirs CMakeFiles campvis-modules.dir .svn)
LIST(REMOVE_ITEM ModDirs campvis-modules.dir)
# go through each subdirectory # go through each subdirectory
FOREACH(ModDir ${ModDirs}) FOREACH(ModDir ${ModDirs})
...@@ -219,11 +217,11 @@ FOREACH(ModDir ${ModDirs}) ...@@ -219,11 +217,11 @@ FOREACH(ModDir ${ModDirs})
INCLUDE(${ModFile}) INCLUDE(${ModFile})
# merge module settings into global settings # merge module settings into global settings
LIST(APPEND CAMPVisModulesDefinitions ${ThisModDefinitions}) LIST(APPEND CampvisModulesDefinitions ${ThisModDefinitions})
LIST(APPEND CAMPVisModulesIncludeDirs ${ThisModIncludeDirs}) LIST(APPEND CampvisModulesIncludeDirs ${ThisModIncludeDirs})
LIST(APPEND CAMPVisModulesExternalLibs ${ThisModExternalLibs}) LIST(APPEND CampvisModulesExternalLibs ${ThisModExternalLibs})
LIST(APPEND CAMPVisModulesSources ${ThisModSources}) LIST(APPEND CampvisModulesSources ${ThisModSources})
LIST(APPEND CAMPVisModulesHeaders ${ThisModHeaders}) LIST(APPEND CampvisModulesHeaders ${ThisModHeaders})
# unset module settings to avoid duplicates if module cmake file misses sth. # unset module settings to avoid duplicates if module cmake file misses sth.
UNSET(ThisModDefinitions) UNSET(ThisModDefinitions)
...@@ -243,5 +241,6 @@ FOREACH(ModDir ${ModDirs}) ...@@ -243,5 +241,6 @@ FOREACH(ModDir ${ModDirs})
ENDFOREACH(ModDir ${ModDirs}) ENDFOREACH(ModDir ${ModDirs})
SET(COMMONCONF_PROCESSED TRUE) SET(CommonconfProcessed TRUE)
ENDIF(NOT COMMONCONF_PROCESSED) ENDIF(NOT CommonconfProcessed)
\ No newline at end of file
...@@ -4,7 +4,7 @@ INCLUDE(../cmake/commonconf.cmake) ...@@ -4,7 +4,7 @@ INCLUDE(../cmake/commonconf.cmake)
MESSAGE(STATUS "Configuring CAMPVis Core") MESSAGE(STATUS "Configuring CAMPVis Core")
FILE(GLOB CAMPVIS_CORE_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FILE(GLOB CampvisCoreSources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
classification/*.cpp classification/*.cpp
datastructures/*.cpp datastructures/*.cpp
eventhandlers/*.cpp eventhandlers/*.cpp
...@@ -13,7 +13,7 @@ FILE(GLOB CAMPVIS_CORE_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ...@@ -13,7 +13,7 @@ FILE(GLOB CAMPVIS_CORE_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
tools/*.cpp tools/*.cpp
) )
FILE(GLOB CAMPVIS_CORE_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FILE(GLOB CampvisCoreHeaders RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
classification/*.h classification/*.h
datastructures/*.h datastructures/*.h
eventhandlers/*.h eventhandlers/*.h
...@@ -26,28 +26,27 @@ FILE(GLOB CAMPVIS_CORE_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ...@@ -26,28 +26,27 @@ FILE(GLOB CAMPVIS_CORE_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
glsl/tools/*.frag glsl/tools/*.frag
) )
#SET(CAMPVIS_CORE_SOURCES #SET(CampvisCoreSources
# application/campvis.cpp # application/campvis.cpp
# application/campvispainter.cpp # application/campvispainter.cpp
# datastructures/ # datastructures/
#) #)
#SET(CAMPVIS_CORE_HEADERS #SET(CampvisCoreHeaders
# application/campvispainter.h # application/campvispainter.h
#) #)
# #
# Qt related stuff: # Qt related stuff:
# #
FIND_PACKAGE(Qt4 ${CAMPVIS_REQUIRED_QT_VERSION} REQUIRED QtCore QtGui QtOpenGL) # TODO: remove Qt stuff here!
#QT4_WRAP_CPP(CAMPVIS_CORE_MOC ${CAMPVIS_CORE_HEADERS}) FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_LIBRARY(campvis-core ADD_LIBRARY(campvis-core
${CAMPVIS_CORE_SOURCES} ${CAMPVIS_CORE_HEADERS} ${CampvisCoreSources} ${CampvisCoreHeaders}
# ${CAMPVIS_CORE_MOC}
) )
ADD_DEFINITIONS(${CAMPVIS_DEFINITIONS} ${QT_DEFINITIONS}) ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CAMPVIS_INCLUDE_DIRECTORIES}) INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-core tgt ${CAMPVIS_EXTERNAL_LIBRARIES} ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(campvis-core tgt ${CampvisGlobalExternalLibs} ${QT_LIBRARIES})
...@@ -10,14 +10,14 @@ MESSAGE(STATUS "Configuring tgt Library") ...@@ -10,14 +10,14 @@ MESSAGE(STATUS "Configuring tgt Library")
# #
# Qt related stuff: # Qt related stuff:
# #
FIND_PACKAGE(Qt4 ${CAMPVIS_REQUIRED_QT_VERSION} REQUIRED QtCore QtGui QtOpenGL) FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
# configuration # configuration
IF(TGT_WITH_WMI) IF(TGT_WITH_WMI)
ADD_DEFINITIONS("-DTGT_WITH_WMI") ADD_DEFINITIONS("-DTGT_WITH_WMI")
ADD_DEFINITIONS("-D_WIN32_DCOM") #< for CoInitializeSecurity() to be defined ADD_DEFINITIONS("-D_WIN32_DCOM") #< for CoInitializeSecurity() to be defined
LIST(APPEND CAMPVIS_EXTERNAL_LIBRARIES "WbemUuid") LIST(APPEND CampvisGlobalExternalLibs "WbemUuid")
ENDIF(TGT_WITH_WMI) ENDIF(TGT_WITH_WMI)
# headers # headers
...@@ -82,12 +82,12 @@ SET(TGT_SOURCES ...@@ -82,12 +82,12 @@ SET(TGT_SOURCES
# define library target # define library target
################################################################################ ################################################################################
ADD_LIBRARY(tgt ${TGT_SOURCES} ${TGT_HEADERS}) ADD_LIBRARY(tgt ${TGT_SOURCES} ${TGT_HEADERS})
ADD_DEFINITIONS(${CAMPVIS_DEFINITIONS} ${CAMPVIS_MODULE_DEFINITIONS} ${QT_DEFINITIONS}) ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CAMPVIS_MODULE_DEFINITIONS} ${QT_DEFINITIONS})
IF(CAMPVIS_SHARED_LIBS AND MSVC) IF(CAMPVIS_SHARED_LIBS AND MSVC)
ADD_DEFINITIONS("-DTGT_BUILD_DLL") ADD_DEFINITIONS("-DTGT_BUILD_DLL")
ENDIF() ENDIF()
INCLUDE_DIRECTORIES(${CAMPVIS_INCLUDE_DIRECTORIES} ${CAMPVIS_MODULE_INCLUDE_DIRECTORIES}) INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CAMPVIS_MODULE_INCLUDE_DIRECTORIES})
TARGET_LINK_LIBRARIES(tgt ${CAMPVIS_EXTERNAL_LIBRARIES} ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(tgt ${CampvisGlobalExternalLibs} ${QT_LIBRARIES})
################################################################################ ################################################################################
# deployment # deployment
......
...@@ -2,18 +2,18 @@ PROJECT(campvis-modules) ...@@ -2,18 +2,18 @@ PROJECT(campvis-modules)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
#INCLUDE(../cmake/commonconf.cmake) #INCLUDE(../cmake/commonconf.cmake)
MESSAGE(STATUS "Configuring CAMPVis Modules") MESSAGE(STATUS "Configuring Campvis Modules")
ADD_LIBRARY(campvis-modules ADD_LIBRARY(campvis-modules
${CAMPVisModulesSources} ${CAMPVisModulesHeaders} ${CampvisModulesSources} ${CampvisModulesHeaders}
) )
# TODO: Remove Qt dependency as soon as the pipelines got cleaned up (and thus removed their hard link to tgt/qt/qtcontextmanager.h # TODO: Remove Qt dependency as soon as the pipelines got cleaned up (and thus removed their hard link to tgt/qt/qtcontextmanager.h
FIND_PACKAGE(Qt4 ${CAMPVIS_REQUIRED_QT_VERSION} REQUIRED QtCore QtGui QtOpenGL) FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${CAMPVIS_DEFINITIONS} ${CAMPVisModulesDefinitions} ${QT_DEFINITIONS}) ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CAMPVIS_INCLUDE_DIRECTORIES} ${CAMPVisModulesIncludeDirs}) INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-modules campvis-core tgt ${CAMPVisModulesExternalLibs} ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(campvis-modules campvis-core tgt ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment