Commit 6a9c4ca7 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Cleaned up CMake build scripts.

Removed redundant CMake options, renamed test-campvis to campvis-test and removed pipeline and converter registration, since building shared libraries is mandatory now.
parent 452a6475
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ SET(CAMPVIS_VERSION 1.0.0)
# = Global Build Options ======================================================
OPTION(BUILD_SHARED_LIBS            "Build shared libraries (strongly recommended!)"                ON)
OPTION(CAMPVIS_DEBUG                "Activate debug code?"                                          ON)
OPTION(CAMPVIS_BUILD_LIB_CGT        "Build CGT Library"                                             ON)
OPTION(CAMPVIS_BUILD_APPLICATION    "Build CAMPVis Application"                                     ON)
OPTION(CAMPVIS_BUILD_MODULES        "Build CAMPVis Modules"                                         ON)
OPTION(CAMPVIS_ENABLE_SCRIPTING     "Add support for scripting CAMPVis using Lua"                   OFF)
@@ -27,6 +28,10 @@ ENDIF()
SET(CAMPVIS_DEFAULT_ENABLED_MODULES "STABLE_NO_DEPENDENCIES" CACHE STRING "Default CAMPVis modules to activate")
SET_PROPERTY(CACHE CAMPVIS_DEFAULT_ENABLED_MODULES PROPERTY STRINGS "NONE" "STABLE_NO_DEPENDENCIES" "STABLE_WITH_EXTERNAL_DEPENDENCIES" "TESTING" "ALL")

IF(NOT BUILD_SHARED_LIBS)
    MESSAGE(WARNING "Building shared libraries is turned off. Thus, CAMPVis will most probably not work as intended!\nPlease turn BUILD_SHARED_LIBS on unless you know what you're doing!")
ENDIF(NOT BUILD_SHARED_LIBS)

# propagate CAMPVIS_ENABLE_SCRIPTING to CAMPVIS_BUILD_LIB_LUA to support deprecated code
IF (CAMPVIS_ENABLE_SCRIPTING)
    SET(CAMPVIS_BUILD_LIB_LUA ON)
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
# LUA_INCLUDE_DIR
# LUA_LIBRARY

IF(CAMPVIS_BUILD_LIB_LUA)
IF(CAMPVIS_ENABLE_SCRIPTING)
    SET(LUA_DIR "${CampvisHome}/ext/lua" CACHE PATH "If Lua is not found, set this path")

    SET(LUA_INCLUDE_DIR "${LUA_DIR}/src" "${CMAKE_BINARY_DIR}/ext/lua")
@@ -15,6 +15,6 @@ IF(CAMPVIS_BUILD_LIB_LUA)
    ELSE()
        SET(LUA_FOUND FALSE)
    ENDIF()
ENDIF(CAMPVIS_BUILD_LIB_LUA)
ENDIF(CAMPVIS_ENABLE_SCRIPTING)

MARK_AS_ADVANCED(LUA_DIR LUA_INCLUDE_DIR LUA_LIBRARY)
+0 −2
Original line number Diff line number Diff line
@@ -189,9 +189,7 @@ IF(WIN32)
    SET(CGT_WITH_WMI TRUE)  #< enable Windows Management Instrumentation for hardware detection
ENDIF()
IF(CAMPVIS_DEBUG)
#    SET_PROPERTY(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG CGT_DEBUG CAMPVIS_DEBUG)
    LIST(APPEND CampvisGlobalDefinitions -DCGT_DEBUG -DCAMPVIS_DEBUG)
#    set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG "CGT_DEBUG CAMPVIS_DEBUG")
ENDIF()
 
# minimum Qt version
+0 −5
Original line number Diff line number Diff line
@@ -167,11 +167,6 @@ MACRO(INCLUDE_MODULE ModuleDirectory ModuleListFile)

        # add definition that this module is activated
        LIST(APPEND CampvisGlobalDefinitions -DCAMPVIS_HAS_MODULE_${ModuleDirectoryUpper})

        # parse all header files for pipeline classes to add them to the pipeline registration
        FOREACH(HeaderFile ${ThisModHeaders})
            PARSE_HEADER_FOR_PIPELINE("modules/${HeaderFile}")
        ENDFOREACH()
    ENDIF(${CAMPVIS_BUILD_MODULE_${ModDirUpper}})

    # unset module settings to avoid duplicates if module cmake file misses sth.
+1 −1
Original line number Diff line number Diff line
PROJECT(campvis-core)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
#INCLUDE(../cmake/commonconf.cmake)
INCLUDE(../cmake/commonconf.cmake)

MESSAGE(STATUS "Configuring CAMPVis-Core")

Loading