From ee4e2afa76dd647945773d89b6fa35b7b7d84c29 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 9 Apr 2009 09:23:45 +0000 Subject: [PATCH] From Philip Lowman, clean up of CMake files --- CMakeModules/CheckAtomicOps.cmake | 10 +- CMakeModules/ModuleInstall.cmake | 6 +- CMakeModules/OsgCPack.cmake | 51 ++-- CMakeModules/OsgDetermineCompiler.cmake | 137 +++++---- CMakeModules/UtilityMacros.cmake | 330 ++++++++++++---------- CMakeModules/cmake_uninstall.cmake.in | 34 +-- src/osgPlugins/3dc/CMakeLists.txt | 3 - src/osgPlugins/3ds/CMakeLists.txt | 87 +++--- src/osgPlugins/OpenFlight/CMakeLists.txt | 3 - src/osgPlugins/ac/CMakeLists.txt | 3 - src/osgPlugins/bmp/CMakeLists.txt | 3 - src/osgPlugins/bvh/CMakeLists.txt | 3 - src/osgPlugins/curl/CMakeLists.txt | 12 +- src/osgPlugins/dae/CMakeLists.txt | 60 ++-- src/osgPlugins/dds/CMakeLists.txt | 3 - src/osgPlugins/dicom/CMakeLists.txt | 11 +- src/osgPlugins/dot/CMakeLists.txt | 2 - src/osgPlugins/dw/CMakeLists.txt | 3 - src/osgPlugins/ffmpeg/CMakeLists.txt | 2 +- src/osgPlugins/freetype/CMakeLists.txt | 18 +- src/osgPlugins/gecko/CMakeLists.txt | 10 +- src/osgPlugins/geo/CMakeLists.txt | 28 +- src/osgPlugins/gif/CMakeLists.txt | 9 +- src/osgPlugins/glsl/CMakeLists.txt | 3 - src/osgPlugins/gz/CMakeLists.txt | 1 - src/osgPlugins/hdr/CMakeLists.txt | 3 - src/osgPlugins/ive/CMakeLists.txt | 4 +- src/osgPlugins/jp2/CMakeLists.txt | 2 +- src/osgPlugins/jpeg/CMakeLists.txt | 6 +- src/osgPlugins/logo/CMakeLists.txt | 3 - src/osgPlugins/lws/CMakeLists.txt | 3 - src/osgPlugins/md2/CMakeLists.txt | 3 - src/osgPlugins/net/CMakeLists.txt | 3 - src/osgPlugins/obj/CMakeLists.txt | 3 - src/osgPlugins/osg/CMakeLists.txt | 3 - src/osgPlugins/osgFX/CMakeLists.txt | 18 +- src/osgPlugins/osgParticle/CMakeLists.txt | 66 +++-- src/osgPlugins/osgTerrain/CMakeLists.txt | 3 - src/osgPlugins/osgText/CMakeLists.txt | 3 - src/osgPlugins/osgWidget/CMakeLists.txt | 3 - src/osgPlugins/osga/CMakeLists.txt | 3 - src/osgPlugins/osgtgz/CMakeLists.txt | 3 - src/osgPlugins/pfb/CMakeLists.txt | 4 +- src/osgPlugins/pic/CMakeLists.txt | 3 - src/osgPlugins/png/CMakeLists.txt | 5 +- src/osgPlugins/quicktime/CMakeLists.txt | 2 +- src/osgPlugins/rgb/CMakeLists.txt | 3 - src/osgPlugins/rot/CMakeLists.txt | 3 - src/osgPlugins/scale/CMakeLists.txt | 3 - src/osgPlugins/shp/CMakeLists.txt | 15 +- src/osgPlugins/stl/CMakeLists.txt | 3 - src/osgPlugins/svg/CMakeLists.txt | 3 - src/osgPlugins/tga/CMakeLists.txt | 3 - src/osgPlugins/tgz/CMakeLists.txt | 3 - src/osgPlugins/trans/CMakeLists.txt | 3 - src/osgPlugins/txp/CMakeLists.txt | 3 - src/osgPlugins/vnc/CMakeLists.txt | 5 +- src/osgPlugins/vrml/CMakeLists.txt | 52 +++- src/osgPlugins/vtf/CMakeLists.txt | 3 - src/osgPlugins/x/CMakeLists.txt | 14 +- src/osgPlugins/xine/CMakeLists.txt | 2 +- src/osgPlugins/zip/CMakeLists.txt | 3 - 62 files changed, 534 insertions(+), 565 deletions(-) diff --git a/CMakeModules/CheckAtomicOps.cmake b/CMakeModules/CheckAtomicOps.cmake index f0f3cc3f3..3815d7568 100644 --- a/CMakeModules/CheckAtomicOps.cmake +++ b/CMakeModules/CheckAtomicOps.cmake @@ -113,6 +113,10 @@ int main() " _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) -IF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND NOT _OPENTHREADS_ATOMIC_USE_SUN AND NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED AND NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) - SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1) -ENDIF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND NOT _OPENTHREADS_ATOMIC_USE_SUN AND NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED AND NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) +IF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND + NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND + NOT _OPENTHREADS_ATOMIC_USE_SUN AND + NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED AND + NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) + SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1) +ENDIF() diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake index f50e4e162..3332b60e6 100644 --- a/CMakeModules/ModuleInstall.cmake +++ b/CMakeModules/ModuleInstall.cmake @@ -9,10 +9,10 @@ SET(INSTALL_BINDIR bin) IF(WIN32) SET(INSTALL_LIBDIR bin) SET(INSTALL_ARCHIVEDIR lib) -ELSE(WIN32) +ELSE() SET(INSTALL_LIBDIR lib${LIB_POSTFIX}) SET(INSTALL_ARCHIVEDIR lib${LIB_POSTFIX}) -ENDIF(WIN32) +ENDIF() SET(HEADERS_GROUP "Header Files") @@ -23,7 +23,7 @@ SOURCE_GROUP( IF(MSVC AND OSG_MSVC_VERSIONED_DLL) HANDLE_MSVC_DLL() -ENDIF(MSVC AND OSG_MSVC_VERSIONED_DLL) +ENDIF() INSTALL( TARGETS ${LIB_NAME} diff --git a/CMakeModules/OsgCPack.cmake b/CMakeModules/OsgCPack.cmake index bcc0feb01..1719acb3f 100644 --- a/CMakeModules/OsgCPack.cmake +++ b/CMakeModules/OsgCPack.cmake @@ -13,9 +13,9 @@ # require i386 so this is for the future IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") SET(SYSTEM_ARCH "i386") -ELSE("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") +ELSE() SET(SYSTEM_ARCH ${CMAKE_SYSTEM_PROCESSOR}) -ENDIF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") +ENDIF() # set a default system name - use CMake setting (Linux|Windows|...) SET(SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) @@ -26,23 +26,24 @@ SET(SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) IF(MSVC) IF(CMAKE_CL_64) SET(SYSTEM_NAME "win64") - ELSE(CMAKE_CL_64) + ELSE() SET(SYSTEM_NAME "win32") - ENDIF(CMAKE_CL_64) -ENDIF(MSVC) + ENDIF() +ENDIF() + # Guess the compiler (is this desired for other platforms than windows?) IF(NOT DEFINED OSG_CPACK_COMPILER) INCLUDE(OsgDetermineCompiler) -ENDIF(NOT DEFINED OSG_CPACK_COMPILER) +ENDIF() # expose the compiler setting to the user SET(OSG_CPACK_COMPILER "${OSG_COMPILER}" CACHE STRING "This ia short string (vc90, vc80sp1, gcc-4.3, ...) describing your compiler. The string is used for creating package filenames") IF(OSG_CPACK_COMPILER) - SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}-${OSG_CPACK_COMPILER}) -ELSE(OSG_CPACK_COMPILER) - SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}) -ENDIF(OSG_CPACK_COMPILER) + SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}-${OSG_CPACK_COMPILER}) +ELSE() + SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}) +ENDIF() ## variables that apply to all packages @@ -57,15 +58,15 @@ SET(CPACK_SOURCE_GENERATOR "TGZ") IF(MSVC_IDE) SET(OSG_CPACK_CONFIGURATION "$(OutDir)") SET(PACKAGE_TARGET_PREFIX "Package ") -ELSE(MSVC_IDE) +ELSE() # on un*x an empty CMAKE_BUILD_TYPE means release IF(CMAKE_BUILD_TYPE) SET(OSG_CPACK_CONFIGURATION ${CMAKE_BUILD_TYPE}) - ELSE(CMAKE_BUILD_TYPE) + ELSE() SET(OSG_CPACK_CONFIGURATION "Release") - ENDIF(CMAKE_BUILD_TYPE) + ENDIF() SET(PACKAGE_TARGET_PREFIX "package_") -ENDIF(MSVC_IDE) +ENDIF() # Get all defined components GET_CMAKE_PROPERTY(CPACK_COMPONENTS_ALL COMPONENTS) @@ -74,35 +75,39 @@ IF(NOT CPACK_COMPONENTS_ALL) # I set it manually to be the packages that can always be packaged MESSAGE("When building packages please consider using cmake version 2.6.1 or above") SET(CPACK_COMPONENTS_ALL libopenscenegraph libopenthreads openscenegraph libopenscenegraph-dev libopenthreads-dev) -ENDIF(NOT CPACK_COMPONENTS_ALL) +ENDIF() # Create a target that will be used to generate all packages defined below SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL") ADD_CUSTOM_TARGET(${PACKAGE_ALL_TARGETNAME}) +#============================= +# Macro: +# GENERATE_PACKAGING_TARGET() +# MACRO(GENERATE_PACKAGING_TARGET package_name) SET(CPACK_PACKAGE_NAME ${package_name}) # the doc packages don't need a system-arch specification IF(${package} MATCHES -doc) SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION}) - ELSE(${package} MATCHES -doc) + ELSE() SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION}-${OSG_CPACK_SYSTEM_SPEC_STRING}-${OSG_CPACK_CONFIGURATION}) IF(NOT DYNAMIC_OPENSCENEGRAPH) SET(OSG_PACKAGE_FILE_NAME ${OSG_PACKAGE_FILE_NAME}-static) - ENDIF(NOT DYNAMIC_OPENSCENEGRAPH) - ENDIF(${package} MATCHES -doc) + ENDIF() + ENDIF() CONFIGURE_FILE("${OpenSceneGraph_SOURCE_DIR}/CMakeModules/OsgCPackConfig.cmake.in" "${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake" IMMEDIATE) SET(PACKAGE_TARGETNAME "${PACKAGE_TARGET_PREFIX}${package_name}") # This is naive and will probably need fixing eventually - IF(MSVC) + IF(WIN32) SET(MOVE_COMMAND "move") - ELSE(MSVC) + ELSE() SET(MOVE_COMMAND "mv") - ENDIF(MSVC) + ENDIF() # Create a target that creates the current package # and rename the package to give it proper filename @@ -121,6 +126,8 @@ MACRO(GENERATE_PACKAGING_TARGET package_name) COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.tar.gz -> ${OSG_PACKAGE_FILE_NAME}.tar.gz" ) ENDMACRO(GENERATE_PACKAGING_TARGET) +# +#============================= # Create configs and targets for a package including all components SET(OSG_CPACK_COMPONENT ALL) @@ -130,4 +137,4 @@ GENERATE_PACKAGING_TARGET(openscenegraph-all) FOREACH(package ${CPACK_COMPONENTS_ALL}) SET(OSG_CPACK_COMPONENT ${package}) GENERATE_PACKAGING_TARGET(${package}) -ENDFOREACH(package ${CPACK_COMPONENTS_ALL}) +ENDFOREACH() diff --git a/CMakeModules/OsgDetermineCompiler.cmake b/CMakeModules/OsgDetermineCompiler.cmake index 2c10c1605..7b7640bf0 100644 --- a/CMakeModules/OsgDetermineCompiler.cmake +++ b/CMakeModules/OsgDetermineCompiler.cmake @@ -1,81 +1,74 @@ -# - Figure out what compiler (and version) cmake is generating for -# Once done this will define: +# - If Visual Studio is being used, this script sets the variable OSG_COMPILER +# The principal reason for this is due to MSVC 8.0 SP0 vs SP1 builds. # # Variable: # OSG_COMPILER # -IF(CMAKE_COMPILER_IS_GNUCXX) +# Not currently used... +#IF(CMAKE_COMPILER_IS_GNUCXX) +# EXEC_PROGRAM( +# ${CMAKE_CXX_COMPILER} +# ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion +# OUTPUT_VARIABLE gcc_compiler_version +# ) +# #MESSAGE("GCC Version: ${gcc_compiler_version}") - EXEC_PROGRAM( - ${CMAKE_CXX_COMPILER} - ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE gcc_compiler_version - ) - #MESSAGE("GCC Version: ${gcc_compiler_version}") +IF(MSVC60) + SET(OSG_COMPILER "vc60") +ELSEIF(MSVC70) + SET(OSG_COMPILER "vc70") +ELSEIF(MSVC71) + SET(OSG_COMPILER "vc71") +ELSEIF(MSVC80) + SET(OSG_COMPILER "vc80") +ELSEIF(MSVC90) + SET(OSG_COMPILER "vc90") +ENDIF() -ELSE(CMAKE_COMPILER_IS_GNUCXX) - IF(MSVC) - IF(MSVC60) - SET(OSG_COMPILER "vc60") - ENDIF(MSVC60) - IF(MSVC70) - SET(OSG_COMPILER "vc70") - ENDIF(MSVC70) - IF(MSVC71) - SET(OSG_COMPILER "vc71") - ENDIF(MSVC71) - IF(MSVC80) + +IF(MSVC80) + MESSAGE(STATUS "Checking if compiler has service pack 1 installed...") + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" "int main() {return 0;}\n") + + TRY_COMPILE(_TRY_RESULT + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx + CMAKE_FLAGS -D CMAKE_VERBOSE_MAKEFILE=ON + OUTPUT_VARIABLE OUTPUT + ) + + IF(_TRY_RESULT) + # parse for exact compiler version + STRING(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+" vc_compiler_version "${OUTPUT}") + IF(vc_compiler_version) + #MESSAGE("${vc_compiler_version}") + STRING(REGEX MATCHALL "[0-9]+" CL_VERSION_LIST "${vc_compiler_version}") + LIST(GET CL_VERSION_LIST 0 CL_MAJOR_VERSION) + LIST(GET CL_VERSION_LIST 1 CL_MINOR_VERSION) + LIST(GET CL_VERSION_LIST 2 CL_PATCH_VERSION) + LIST(GET CL_VERSION_LIST 3 CL_EXTRA_VERSION) + ENDIF(vc_compiler_version) + + # Standard vc80 is 14.00.50727.42, sp1 14.00.50727.762, sp2? + # Standard vc90 is 9.0.30729.1, sp1 ? + IF(CL_EXTRA_VERSION EQUAL 762) + SET(OSG_COMPILER "vc80sp1") + ELSE(CL_EXTRA_VERSION EQUAL 762) SET(OSG_COMPILER "vc80") - ENDIF(MSVC80) - IF(MSVC90) - SET(OSG_COMPILER "vc90") - ENDIF(MSVC90) + ENDIF(CL_EXTRA_VERSION EQUAL 762) - IF(MSVC80) - MESSAGE(STATUS "Checking if compiler has service pack 1 installed...") - FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" "int main() {return 0;}\n") - - TRY_COMPILE(_TRY_RESULT - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx - CMAKE_FLAGS -D CMAKE_VERBOSE_MAKEFILE=ON - OUTPUT_VARIABLE OUTPUT - ) - - IF(_TRY_RESULT) - # parse for exact compiler version - STRING(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+" vc_compiler_version "${OUTPUT}") - IF(vc_compiler_version) - #MESSAGE("${vc_compiler_version}") - STRING(REGEX MATCHALL "[0-9]+" CL_VERSION_LIST "${vc_compiler_version}") - LIST(GET CL_VERSION_LIST 0 CL_MAJOR_VERSION) - LIST(GET CL_VERSION_LIST 1 CL_MINOR_VERSION) - LIST(GET CL_VERSION_LIST 2 CL_PATCH_VERSION) - LIST(GET CL_VERSION_LIST 3 CL_EXTRA_VERSION) - ENDIF(vc_compiler_version) - - # Standard vc80 is 14.00.50727.42, sp1 14.00.50727.762, sp2? - # Standard vc90 is 9.0.30729.1, sp1 ? - IF(CL_EXTRA_VERSION EQUAL 762) - SET(OSG_COMPILER "vc80sp1") - ELSE(CL_EXTRA_VERSION EQUAL 762) - SET(OSG_COMPILER "vc80") - ENDIF(CL_EXTRA_VERSION EQUAL 762) - - # parse for exact visual studio version - #IF(MSVC_IDE) - # string(REGEX MATCH "Visual Studio Version [0-9]+.[0-9]+.[0-9]+.[0-9]+" vs_version "${OUTPUT}") - # IF(vs_version) - # MESSAGE("${vs_version}") - # string(REGEX MATCHALL "[0-9]+" VS_VERSION_LIST "${vs_version}") - # list(GET VS_VERSION_LIST 0 VS_MAJOR_VERSION) - # list(GET VS_VERSION_LIST 1 VS_MINOR_VERSION) - # list(GET VS_VERSION_LIST 2 VS_PATCH_VERSION) - # list(GET VS_VERSION_LIST 3 VS_EXTRA_VERSION) - # ENDIF(vs_version) - #ENDIF(MSVC_IDE) - ENDIF(_TRY_RESULT) - ENDIF(MSVC80) - ENDIF(MSVC) -ENDIF(CMAKE_COMPILER_IS_GNUCXX) + # parse for exact visual studio version + #IF(MSVC_IDE) + # string(REGEX MATCH "Visual Studio Version [0-9]+.[0-9]+.[0-9]+.[0-9]+" vs_version "${OUTPUT}") + # IF(vs_version) + # MESSAGE("${vs_version}") + # string(REGEX MATCHALL "[0-9]+" VS_VERSION_LIST "${vs_version}") + # list(GET VS_VERSION_LIST 0 VS_MAJOR_VERSION) + # list(GET VS_VERSION_LIST 1 VS_MINOR_VERSION) + # list(GET VS_VERSION_LIST 2 VS_PATCH_VERSION) + # list(GET VS_VERSION_LIST 3 VS_EXTRA_VERSION) + # ENDIF(vs_version) + #ENDIF(MSVC_IDE) + ENDIF(_TRY_RESULT) +ENDIF(MSVC80) diff --git a/CMakeModules/UtilityMacros.cmake b/CMakeModules/UtilityMacros.cmake index 7135731e4..63baf17bf 100644 --- a/CMakeModules/UtilityMacros.cmake +++ b/CMakeModules/UtilityMacros.cmake @@ -1,180 +1,220 @@ INCLUDE(ListHandle) +#--------------------------------------------------- +# Macro: FILTER_OUT FILTERS INPUTS OUTPUT +# +# Mimicks Gnu Make's $(filter-out) which removes elements +# from a list that match the pattern. +# Arguments: +# FILTERS - list of patterns that need to be removed +# INPUTS - list of inputs that will be worked on +# OUTPUT - the filtered list to be returned +# +# Example: +# SET(MYLIST this that and the other) +# SET(FILTS this that) +# +# FILTER_OUT("${FILTS}" "${MYLIST}" OUT) +# MESSAGE("OUTPUT = ${OUT}") +# +# The output - +# OUTPUT = and;the;other +# +#--------------------------------------------------- +MACRO(FILTER_OUT FILTERS INPUTS OUTPUT) + SET(FOUT "") + FOREACH(INP ${INPUTS}) + SET(FILTERED 0) - MACRO(FILTER_OUT FILTERS INPUTS OUTPUT) - # Mimicks Gnu Make's $(filter-out) which removes elements - # from a list that match the pattern. - # Arguments: - # FILTERS - list of patterns that need to be removed - # INPUTS - list of inputs that will be worked on - # OUTPUT - the filtered list to be returned - # - # Example: - # SET(MYLIST this that and the other) - # SET(FILTS this that) - # - # FILTER_OUT("${FILTS}" "${MYLIST}" OUT) - # MESSAGE("OUTPUT = ${OUT}") - # - # The output - - # OUTPUT = and;the;other - # - SET(FOUT "") - FOREACH(INP ${INPUTS}) - SET(FILTERED 0) - FOREACH(FILT ${FILTERS}) - IF(${FILTERED} EQUAL 0) - IF("${FILT}" STREQUAL "${INP}") - SET(FILTERED 1) - ENDIF("${FILT}" STREQUAL "${INP}") - ENDIF(${FILTERED} EQUAL 0) - ENDFOREACH(FILT ${FILTERS}) - IF(${FILTERED} EQUAL 0) - SET(FOUT ${FOUT} ${INP}) - ENDIF(${FILTERED} EQUAL 0) - ENDFOREACH(INP ${INPUTS}) - SET(${OUTPUT} ${FOUT}) - ENDMACRO(FILTER_OUT FILTERS INPUTS OUTPUT) + FOREACH(FILT ${FILTERS}) + IF(${FILTERED} EQUAL 0) + IF("${FILT}" STREQUAL "${INP}") + SET(FILTERED 1) + ENDIF() + ENDIF() + ENDFOREACH() + IF(${FILTERED} EQUAL 0) + SET(FOUT ${FOUT} ${INP}) + ENDIF() - MACRO(GET_HEADERS_EXTENSIONLESS DIR GLOB_PATTERN OUTPUT) - FILE(GLOB TMP "${DIR}/${GLOB_PATTERN}" ) - #FOREACH(F ${TMP}) - # MESSAGE(STATUS "header-->${F}<--") - #ENDFOREACH(F ${TMP}) - FILTER_OUT("${DIR}/CVS" "${TMP}" TMP) - FILTER_OUT("${DIR}/cvs" "${TMP}" ${OUTPUT}) - FILTER_OUT("${DIR}/.svn" "${TMP}" ${OUTPUT}) - ENDMACRO(GET_HEADERS_EXTENSIONLESS DIR GLOB_PATTERN OUTPUT) - -MACRO(ADD_DIRS_TO_ENV_VAR _VARNAME ) - FOREACH(_ADD_PATH ${ARGN}) - FILE(TO_NATIVE_PATH ${_ADD_PATH} _ADD_NATIVE) - #SET(_CURR_ENV_PATH $ENV{PATH}) - #LIST(SET _CURR_ENV_PATH ${_ADD_PATH}) - #SET(ENV{PATH} ${_CURR_ENV_PATH})${_FILE} - IF(WIN32) - SET(ENV{${_VARNAME}} "$ENV{${_VARNAME}};${_ADD_NATIVE}") - ELSE(WIN32) - SET(ENV{${_VARNAME}} "$ENV{${_VARNAME}}:${_ADD_NATIVE}") - ENDIF(WIN32) - #MESSAGE(" env ${_VARNAME} --->$ENV{${_VARNAME}}<---") - ENDFOREACH(_ADD_PATH) -ENDMACRO(ADD_DIRS_TO_ENV_VAR _VARNAME ) + ENDFOREACH(INP ${INPUTS}) + SET(${OUTPUT} ${FOUT}) +ENDMACRO() #--------------------------------------------------- -# MACRO CORRECT_PATH VAR PATH -# corrects slashes in PATH to be cmake conformous ( / ) +# Macro: GET_HEADERS_EXTENSIONLESS DIR GLOB_PATTERN OUTPUT +# +#--------------------------------------------------- +MACRO(GET_HEADERS_EXTENSIONLESS DIR GLOB_PATTERN OUTPUT) + FILE(GLOB TMP "${DIR}/${GLOB_PATTERN}" ) + #FOREACH(F ${TMP}) + # MESSAGE(STATUS "header-->${F}<--") + #ENDFOREACH(F ${TMP}) + FILTER_OUT("${DIR}/CVS" "${TMP}" TMP) + FILTER_OUT("${DIR}/cvs" "${TMP}" ${OUTPUT}) + FILTER_OUT("${DIR}/.svn" "${TMP}" ${OUTPUT}) +ENDMACRO() + +#--------------------------------------------------- +# Macro: ADD_DIRS_TO_ENV_VAR _VARNAME +# +#--------------------------------------------------- + +MACRO(ADD_DIRS_TO_ENV_VAR _VARNAME ) + FOREACH(_ADD_PATH ${ARGN}) + FILE(TO_NATIVE_PATH ${_ADD_PATH} _ADD_NATIVE) + #SET(_CURR_ENV_PATH $ENV{PATH}) + #LIST(SET _CURR_ENV_PATH ${_ADD_PATH}) + #SET(ENV{PATH} ${_CURR_ENV_PATH})${_FILE} + IF(WIN32) + SET(ENV{${_VARNAME}} "$ENV{${_VARNAME}};${_ADD_NATIVE}") + ELSE() + SET(ENV{${_VARNAME}} "$ENV{${_VARNAME}}:${_ADD_NATIVE}") + ENDIF() + #MESSAGE(" env ${_VARNAME} --->$ENV{${_VARNAME}}<---") + ENDFOREACH() +ENDMACRO() + +#--------------------------------------------------- +# Macro: CORRECT_PATH VAR PATH +# +# Corrects slashes in PATH to be cmake conformous ( / ) # and puts result in VAR #--------------------------------------------------- MACRO(CORRECT_PATH VAR PATH) SET(${VAR} ${PATH}) -IF(WIN32) - STRING(REGEX REPLACE "/" "\\\\" ${VAR} "${PATH}") -ENDIF(WIN32) -ENDMACRO(CORRECT_PATH) + IF(WIN32) + STRING(REGEX REPLACE "/" "\\\\" ${VAR} "${PATH}") + ENDIF() +ENDMACRO() + +#--------------------------------------------------- +# Macro: TARGET_LOCATIONS_SET_FILE FILE +# TODO: Ok, this seems a bit ridiculuous. +#--------------------------------------------------- MACRO(TARGET_LOCATIONS_SET_FILE FILE) - SET(ACCUM_FILE_TARGETS ${FILE}) - FILE(WRITE ${ACCUM_FILE_TARGETS} "") -ENDMACRO(TARGET_LOCATIONS_SET_FILE FILE) + SET(ACCUM_FILE_TARGETS ${FILE}) + FILE(WRITE ${ACCUM_FILE_TARGETS} "") +ENDMACRO() + +#--------------------------------------------------- +# Macro: TARGET_LOCATIONS_ACCUM TARGET_NAME +# +#--------------------------------------------------- MACRO(TARGET_LOCATIONS_ACCUM TARGET_NAME) - IF(ACCUM_FILE_TARGETS) - IF(EXISTS ${ACCUM_FILE_TARGETS}) - GET_TARGET_PROPERTY(_FILE_LOCATION ${TARGET_NAME} LOCATION) - FILE(APPEND ${ACCUM_FILE_TARGETS} "${_FILE_LOCATION};") - #SET(_TARGETS_LIST ${_TARGETS_LIST} "${_FILE_LOCATION}" CACHE INTERNAL "lista dll") - #MESSAGE("adding target -->${TARGET_NAME}<-- file -->${_FILE_LOCATION}<-- to list -->${_TARGETS_LIST}<--") - #SET(ACCUM_FILE_TARGETS ${ACCUM_FILE_TARGETS} ${_FILE_LOCATION}) - ENDIF(EXISTS ${ACCUM_FILE_TARGETS}) - ENDIF(ACCUM_FILE_TARGETS) -ENDMACRO(TARGET_LOCATIONS_ACCUM TARGET_NAME) + IF(ACCUM_FILE_TARGETS) + IF(EXISTS ${ACCUM_FILE_TARGETS}) + GET_TARGET_PROPERTY(_FILE_LOCATION ${TARGET_NAME} LOCATION) + FILE(APPEND ${ACCUM_FILE_TARGETS} "${_FILE_LOCATION};") + #SET(_TARGETS_LIST ${_TARGETS_LIST} "${_FILE_LOCATION}" CACHE INTERNAL "lista dll") + #MESSAGE("adding target -->${TARGET_NAME}<-- file -->${_FILE_LOCATION}<-- to list -->${_TARGETS_LIST}<--") + #SET(ACCUM_FILE_TARGETS ${ACCUM_FILE_TARGETS} ${_FILE_LOCATION}) + ENDIF() + ENDIF() +ENDMACRO() + +#--------------------------------------------------- +# Macro: TARGET_LOCATIONS_GET_LIST _VAR +# +#--------------------------------------------------- MACRO(TARGET_LOCATIONS_GET_LIST _VAR) - IF(ACCUM_FILE_TARGETS) - IF(EXISTS ${ACCUM_FILE_TARGETS}) - FILE(READ ${ACCUM_FILE_TARGETS} ${_VAR}) - ENDIF(EXISTS ${ACCUM_FILE_TARGETS}) - ENDIF(ACCUM_FILE_TARGETS) -ENDMACRO(TARGET_LOCATIONS_GET_LIST _VAR) + IF(ACCUM_FILE_TARGETS) + IF(EXISTS ${ACCUM_FILE_TARGETS}) + FILE(READ ${ACCUM_FILE_TARGETS} ${_VAR}) + ENDIF(EXISTS ${ACCUM_FILE_TARGETS}) + ENDIF() +ENDMACRO() +#--------------------------------------------------- +# Macro: FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY SEARCHPATHLIST +# +#--------------------------------------------------- MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY SEARCHPATHLIST) + MESSAGE(STATUS "searching ${DEPNAME} -->${INCLUDEFILE}<-->${LIBRARY}<-->${SEARCHPATHLIST}<--") -MESSAGE(STATUS "searching ${DEPNAME} -->${INCLUDEFILE}<-->${LIBRARY}<-->${SEARCHPATHLIST}<--") + SET(MY_PATH_INCLUDE ) + SET(MY_PATH_LIB ) + SET(MY_PATH_BIN ) -SET(MY_PATH_INCLUDE ) -SET(MY_PATH_LIB ) -SET(MY_PATH_BIN ) + FOREACH( MYPATH ${SEARCHPATHLIST} ) + SET(MY_PATH_INCLUDE ${MY_PATH_INCLUDE} ${MYPATH}/include) + SET(MY_PATH_LIB ${MY_PATH_LIB} ${MYPATH}/lib) + SET(MY_PATH_BIN ${MY_PATH_BIN} ${MYPATH}/bin) + ENDFOREACH() -FOREACH( MYPATH ${SEARCHPATHLIST} ) - SET(MY_PATH_INCLUDE ${MY_PATH_INCLUDE} ${MYPATH}/include) - SET(MY_PATH_LIB ${MY_PATH_LIB} ${MYPATH}/lib) - SET(MY_PATH_BIN ${MY_PATH_BIN} ${MYPATH}/bin) -ENDFOREACH( MYPATH ${SEARCHPATHLIST} ) + SET(MYLIBRARY "${LIBRARY}") + SEPARATE_ARGUMENTS(MYLIBRARY) -SET(MYLIBRARY "${LIBRARY}") -SEPARATE_ARGUMENTS(MYLIBRARY) + #MESSAGE( " include paths: -->${MY_PATH_INCLUDE}<--") -#MESSAGE( " include paths: -->${MY_PATH_INCLUDE}<--") + #MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--") -#MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--") - -FIND_PATH("${DEPNAME}_INCLUDE_DIR" ${INCLUDEFILE} - ${MY_PATH_INCLUDE} -) -MARK_AS_ADVANCED("${DEPNAME}_INCLUDE_DIR") -#MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--") + FIND_PATH("${DEPNAME}_INCLUDE_DIR" ${INCLUDEFILE} + ${MY_PATH_INCLUDE} + ) + MARK_AS_ADVANCED("${DEPNAME}_INCLUDE_DIR") + #MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--") -FIND_LIBRARY("${DEPNAME}_LIBRARY" - NAMES ${MYLIBRARY} - PATHS ${MY_PATH_LIB} -) -IF(${DEPNAME}_LIBRARY) - GET_FILENAME_COMPONENT(MYLIBNAME ${${DEPNAME}_LIBRARY} NAME_WE) - GET_FILENAME_COMPONENT(MYBINPATH ${${DEPNAME}_LIBRARY} PATH) - GET_FILENAME_COMPONENT(MYBINPATH ${MYBINPATH} PATH) - SET(MYBINPATH "${MYBINPATH}/bin") - IF(EXISTS ${MYBINPATH}) - SET(MYFOUND 0) - FOREACH(MYPATH ${MY_ACCUM_BINARY_DEP}) - IF(MYPATH MATCHES ${MYBINPATH}) - SET(MYFOUND 1) - #MESSAGE("found -->${MYPATH}<-->${MYBINPATH}<--") - ENDIF(MYPATH MATCHES ${MYBINPATH}) - ENDFOREACH(MYPATH ) - IF(MYFOUND EQUAL 0) - SET(MY_ACCUM_BINARY_DEP ${MY_ACCUM_BINARY_DEP} ${MYBINPATH}) - ENDIF(MYFOUND EQUAL 0) - ENDIF(EXISTS ${MYBINPATH}) - #MESSAGE("${DEPNAME}_BINDEP searching -->${MYLIBNAME}${CMAKE_SHARED_MODULE_SUFFIX}<--in-->${MY_PATH_BIN}<--") -# FIND_FILE("${DEPNAME}_BINDEP" -# ${MYLIBNAME}${CMAKE_SHARED_MODULE_SUFFIX} -# PATHS ${MY_PATH_BIN} -# ) -# FIND_LIBRARY("${DEPNAME}_BINDEP" -# NAMES ${MYLIBRARY} -# PATHS ${MY_PATH_BIN} -# ) -ENDIF(${DEPNAME}_LIBRARY) -MARK_AS_ADVANCED("${DEPNAME}_LIBRARY") -#MESSAGE( " ${DEPNAME}_LIBRARY --> ${${DEPNAME}_LIBRARY}<--") -IF(${DEPNAME}_INCLUDE_DIR) - IF(${DEPNAME}_LIBRARY) - SET( ${DEPNAME}_FOUND "YES" ) - SET( ${DEPNAME}_LIBRARIES ${${DEPNAME}_LIBRARY} ) - ENDIF(${DEPNAME}_LIBRARY) -ENDIF(${DEPNAME}_INCLUDE_DIR) -ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY SEARCHPATHLIST) + FIND_LIBRARY("${DEPNAME}_LIBRARY" + NAMES ${MYLIBRARY} + PATHS ${MY_PATH_LIB} + ) + IF(${DEPNAME}_LIBRARY) + GET_FILENAME_COMPONENT(MYLIBNAME ${${DEPNAME}_LIBRARY} NAME_WE) + GET_FILENAME_COMPONENT(MYBINPATH ${${DEPNAME}_LIBRARY} PATH) + GET_FILENAME_COMPONENT(MYBINPATH ${MYBINPATH} PATH) + SET(MYBINPATH "${MYBINPATH}/bin") + IF(EXISTS ${MYBINPATH}) + SET(MYFOUND 0) + FOREACH(MYPATH ${MY_ACCUM_BINARY_DEP}) + IF(MYPATH MATCHES ${MYBINPATH}) + SET(MYFOUND 1) + #MESSAGE("found -->${MYPATH}<-->${MYBINPATH}<--") + ENDIF() + ENDFOREACH() + IF(MYFOUND EQUAL 0) + SET(MY_ACCUM_BINARY_DEP ${MY_ACCUM_BINARY_DEP} ${MYBINPATH}) + ENDIF() + ENDIF() + #MESSAGE("${DEPNAME}_BINDEP searching -->${MYLIBNAME}${CMAKE_SHARED_MODULE_SUFFIX}<--in-->${MY_PATH_BIN}<--") + # FIND_FILE("${DEPNAME}_BINDEP" + # ${MYLIBNAME}${CMAKE_SHARED_MODULE_SUFFIX} + # PATHS ${MY_PATH_BIN} + # ) + # FIND_LIBRARY("${DEPNAME}_BINDEP" + # NAMES ${MYLIBRARY} + # PATHS ${MY_PATH_BIN} + # ) + ENDIF() + + MARK_AS_ADVANCED("${DEPNAME}_LIBRARY") + #MESSAGE( " ${DEPNAME}_LIBRARY --> ${${DEPNAME}_LIBRARY}<--") + IF(${DEPNAME}_INCLUDE_DIR) + IF(${DEPNAME}_LIBRARY) + SET( ${DEPNAME}_FOUND "YES" ) + SET( ${DEPNAME}_LIBRARIES ${${DEPNAME}_LIBRARY} ) + ENDIF() + ENDIF() +ENDMACRO() + +#--------------------------------------------------- +# Macro: MACRO_MESSAGE MYTEXT +# +#--------------------------------------------------- #SET(MACRO_MESSAGE_DEBUG TRUE) MACRO(MACRO_MESSAGE MYTEXT) IF(MACRO_MESSAGE_DEBUG) MESSAGE("in file -->${CMAKE_CURRENT_LIST_FILE}<-- line -->${CMAKE_CURRENT_LIST_LINE}<-- message ${MYTEXT}") - ELSE(MACRO_MESSAGE_DEBUG) + ELSE() MESSAGE(STATUS "in file -->${CMAKE_CURRENT_LIST_FILE}<-- line -->${CMAKE_CURRENT_LIST_LINE}<-- message ${MYTEXT}") - ENDIF(MACRO_MESSAGE_DEBUG) -ENDMACRO(MACRO_MESSAGE MYTEXT) + ENDIF() +ENDMACRO() + diff --git a/CMakeModules/cmake_uninstall.cmake.in b/CMakeModules/cmake_uninstall.cmake.in index bcf2437c7..3b6a9d03c 100644 --- a/CMakeModules/cmake_uninstall.cmake.in +++ b/CMakeModules/cmake_uninstall.cmake.in @@ -1,22 +1,22 @@ IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") -ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +ENDIF() FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) STRING(REGEX REPLACE "\n" ";" files "${files}") + FOREACH(file ${files}) - MESSAGE(STATUS "Uninstalling \"${file}\"") - IF(EXISTS "${file}") - EXEC_PROGRAM( - "@CMAKE_COMMAND@" ARGS "-E remove \"${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - IF("${rm_retval}" STREQUAL 0) - ELSE("${rm_retval}" STREQUAL 0) - MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"") - ENDIF("${rm_retval}" STREQUAL 0) - ELSE(EXISTS "${file}") - MESSAGE(STATUS "File \"${file}\" does not exist.") - ENDIF(EXISTS "${file}") -ENDFOREACH(file) \ No newline at end of file + MESSAGE(STATUS "Uninstalling \"${file}\"") + IF(EXISTS "${file}") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF(NOT "${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"") + ENDIF() + ELSE() + MESSAGE(STATUS "File \"${file}\" does not exist.") + ENDIF() +ENDFOREACH() diff --git a/src/osgPlugins/3dc/CMakeLists.txt b/src/osgPlugins/3dc/CMakeLists.txt index 5871f993c..e81984c39 100644 --- a/src/osgPlugins/3dc/CMakeLists.txt +++ b/src/osgPlugins/3dc/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriter3DC.cpp ) #### end var setup ### SETUP_PLUGIN(3dc) diff --git a/src/osgPlugins/3ds/CMakeLists.txt b/src/osgPlugins/3ds/CMakeLists.txt index 3201c7720..d416855f7 100644 --- a/src/osgPlugins/3ds/CMakeLists.txt +++ b/src/osgPlugins/3ds/CMakeLists.txt @@ -1,51 +1,48 @@ -#this file is automatically generated - - SET(TARGET_SRC -ReaderWriter3DS.cpp -atmosphere.cpp -background.cpp -camera.cpp -chunk.cpp -ease.cpp -file.cpp -lib3ds_float.cpp -light.cpp -material.cpp -matrix.cpp -mesh.cpp -node.cpp -quat.cpp -readwrite.cpp -shadow.cpp -tcb.cpp -tracks.cpp -vector.cpp -viewport.cpp + ReaderWriter3DS.cpp + atmosphere.cpp + background.cpp + camera.cpp + chunk.cpp + ease.cpp + file.cpp + lib3ds_float.cpp + light.cpp + material.cpp + matrix.cpp + mesh.cpp + node.cpp + quat.cpp + readwrite.cpp + shadow.cpp + tcb.cpp + tracks.cpp + vector.cpp + viewport.cpp ) SET(TARGET_H -atmosphere.h -background.h -camera.h -chunk.h -chunktable.h -config.h -ease.h -file.h -lib3ds_float.h -light.h -material.h -matrix.h -mesh.h -node.h -quat.h -readwrite.h -shadow.h -tcb.h -tracks.h -types.h -vector.h -viewport.h + atmosphere.h + background.h + camera.h + chunk.h + chunktable.h + config.h + ease.h + file.h + lib3ds_float.h + light.h + material.h + matrix.h + mesh.h + node.h + quat.h + readwrite.h + shadow.h + tcb.h + tracks.h + types.h + vector.h + viewport.h ) #### end var setup ### SETUP_PLUGIN(3ds) diff --git a/src/osgPlugins/OpenFlight/CMakeLists.txt b/src/osgPlugins/OpenFlight/CMakeLists.txt index c29293fce..f446368a9 100644 --- a/src/osgPlugins/OpenFlight/CMakeLists.txt +++ b/src/osgPlugins/OpenFlight/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC AncillaryRecords.cpp AttrData.cpp diff --git a/src/osgPlugins/ac/CMakeLists.txt b/src/osgPlugins/ac/CMakeLists.txt index 73552b297..0c82dede4 100644 --- a/src/osgPlugins/ac/CMakeLists.txt +++ b/src/osgPlugins/ac/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC Exception.cpp Geode.cpp ac3d.cpp ) SET(TARGET_H Exception.h Geode.h ) #### end var setup ### diff --git a/src/osgPlugins/bmp/CMakeLists.txt b/src/osgPlugins/bmp/CMakeLists.txt index 5847bab9a..ecaba3fe6 100644 --- a/src/osgPlugins/bmp/CMakeLists.txt +++ b/src/osgPlugins/bmp/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterBMP.cpp ) #### end var setup ### SETUP_PLUGIN(bmp) diff --git a/src/osgPlugins/bvh/CMakeLists.txt b/src/osgPlugins/bvh/CMakeLists.txt index a00c8c5c4..edc399a9d 100644 --- a/src/osgPlugins/bvh/CMakeLists.txt +++ b/src/osgPlugins/bvh/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterBVH.cpp ) SET(TARGET_ADDED_LIBRARIES osgAnimation ) diff --git a/src/osgPlugins/curl/CMakeLists.txt b/src/osgPlugins/curl/CMakeLists.txt index 899fa19a6..0b1ba41d3 100644 --- a/src/osgPlugins/curl/CMakeLists.txt +++ b/src/osgPlugins/curl/CMakeLists.txt @@ -8,15 +8,15 @@ IF(WIN32) IF(CURL_IS_STATIC) ADD_DEFINITIONS(-DCURL_STATICLIB) SET(TARGET_EXTERNAL_LIBRARIES ws2_32 winmm wldap32) - ENDIF(CURL_IS_STATIC) -ENDIF(WIN32) + ENDIF() +ENDIF() IF(ZLIB_FOUND) ADD_DEFINITIONS(-DUSE_ZLIB) INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) -ELSE(ZLIB_FOUND) +ELSE() INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} ) -ENDIF(ZLIB_FOUND) +ENDIF() SET(TARGET_SRC @@ -29,9 +29,9 @@ SET(TARGET_H IF(ZLIB_FOUND) SET(TARGET_LIBRARIES_VARS CURL_LIBRARY ZLIB_LIBRARY) -ELSE(ZLIB_FOUND) +ELSE() SET(TARGET_LIBRARIES_VARS CURL_LIBRARY ) -ENDIF(ZLIB_FOUND) +ENDIF() #### end var setup ### diff --git a/src/osgPlugins/dae/CMakeLists.txt b/src/osgPlugins/dae/CMakeLists.txt index cb0c3bac6..71a88303c 100644 --- a/src/osgPlugins/dae/CMakeLists.txt +++ b/src/osgPlugins/dae/CMakeLists.txt @@ -1,8 +1,8 @@ IF (WIN32) INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4 ${COLLADA_BOOST_INCLUDE_DIR} ) -ELSE (WIN32) +ELSE () INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4) -ENDIF (WIN32) +ENDIF () SET(TARGET_SRC daeReader.cpp @@ -27,35 +27,45 @@ SET(TARGET_H ) -IF (COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY) - +IF(COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY) OPTION(COLLADA_USE_STATIC "Set to ON to build OpenSceneGraph with static Collada support." OFF) +ELSEIF(COLLADA_STATIC_LIBRARY) + SET(COLLADA_USE_STATIC "YES") +ELSE() + SET(COLLADA_USE_STATIC "NO") +ENDIF() -ELSE(COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY) - - IF (COLLADA_STATIC_LIBRARY) - SET(COLLADA_USE_STATIC "YES") - ELSE(COLLADA_STATIC_LIBRARY) - SET(COLLADA_USE_STATIC "NO") - ENDIF(COLLADA_STATIC_LIBRARY) - -ENDIF(COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY) - -IF (COLLADA_USE_STATIC) +IF(COLLADA_USE_STATIC) IF(WIN32) ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB) - SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY COLLADA_LIBXML_LIBRARY COLLADA_ZLIB_LIBRARY COLLADA_PCRECPP_LIBRARY COLLADA_PCRE_LIBRARY COLLADA_MINIZIP_LIBRARY COLLADA_BOOST_FILESYSTEM_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY) - ELSE(WIN32) - SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY COLLADA_LIBXML_LIBRARY COLLADA_PCRECPP_LIBRARY COLLADA_BOOST_FILESYSTEM_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY) - ENDIF(WIN32) -ELSE (COLLADA_USE_STATIC) + SET(TARGET_LIBRARIES_VARS + COLLADA_STATIC_LIBRARY + COLLADA_LIBXML_LIBRARY + COLLADA_ZLIB_LIBRARY + COLLADA_PCRECPP_LIBRARY + COLLADA_PCRE_LIBRARY + COLLADA_MINIZIP_LIBRARY + COLLADA_BOOST_FILESYSTEM_LIBRARY + COLLADA_BOOST_SYSTEM_LIBRARY) + ELSE() + SET(TARGET_LIBRARIES_VARS + COLLADA_STATIC_LIBRARY + COLLADA_LIBXML_LIBRARY + COLLADA_PCRECPP_LIBRARY + COLLADA_BOOST_FILESYSTEM_LIBRARY + COLLADA_BOOST_SYSTEM_LIBRARY) + ENDIF() +ELSE() IF(WIN32) ADD_DEFINITIONS(-DDOM_DYNAMIC -DBOOST_ALL_NO_LIB) - SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY) - ELSE(WIN32) - SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY) - ENDIF(WIN32) -ENDIF(COLLADA_USE_STATIC) + SET(TARGET_LIBRARIES_VARS + COLLADA_DYNAMIC_LIBRARY + COLLADA_BOOST_SYSTEM_LIBRARY) + ELSE() + SET(TARGET_LIBRARIES_VARS + COLLADA_DYNAMIC_LIBRARY) + ENDIF() +ENDIF() SET(TARGET_ADDED_LIBRARIES osgSim ) diff --git a/src/osgPlugins/dds/CMakeLists.txt b/src/osgPlugins/dds/CMakeLists.txt index 672c21451..aa6e95798 100644 --- a/src/osgPlugins/dds/CMakeLists.txt +++ b/src/osgPlugins/dds/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterDDS.cpp ) #### end var setup ### SETUP_PLUGIN(dds) diff --git a/src/osgPlugins/dicom/CMakeLists.txt b/src/osgPlugins/dicom/CMakeLists.txt index 75c61828c..354b0131c 100644 --- a/src/osgPlugins/dicom/CMakeLists.txt +++ b/src/osgPlugins/dicom/CMakeLists.txt @@ -1,5 +1,4 @@ -IF (DCMTK_FOUND) - +IF(DCMTK_FOUND) # note, we have to include a '/' in front of the directory string to prevent a CMake bug from ignoring the directory INCLUDE_DIRECTORIES(/${DCMTK_ROOT_INCLUDE_DIR}) @@ -9,9 +8,7 @@ IF (DCMTK_FOUND) ADD_DEFINITIONS(-DUSE_DCMTK) -ELSE(DCMTK_FOUND) - - IF (ITK_FOUND) +ELSEIF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) @@ -27,9 +24,7 @@ ELSE(DCMTK_FOUND) ADD_DEFINITIONS(-DUSE_ITK) - ENDIF(ITK_FOUND) - -ENDIF(DCMTK_FOUND) +ENDIF() SET(TARGET_ADDED_LIBRARIES osgVolume ) diff --git a/src/osgPlugins/dot/CMakeLists.txt b/src/osgPlugins/dot/CMakeLists.txt index 1914c106d..2570af3d4 100644 --- a/src/osgPlugins/dot/CMakeLists.txt +++ b/src/osgPlugins/dot/CMakeLists.txt @@ -1,5 +1,3 @@ -#this file is automatically generated by rschmidt - SET(TARGET_SRC SimpleDotVisitor.cpp BaseDotVisitor.cpp ReaderWriterDOT.cpp) #### end var setup ### diff --git a/src/osgPlugins/dw/CMakeLists.txt b/src/osgPlugins/dw/CMakeLists.txt index 983fb2c13..13627b499 100644 --- a/src/osgPlugins/dw/CMakeLists.txt +++ b/src/osgPlugins/dw/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterDW.cpp ) #### end var setup ### SETUP_PLUGIN(dw) diff --git a/src/osgPlugins/ffmpeg/CMakeLists.txt b/src/osgPlugins/ffmpeg/CMakeLists.txt index 7a10b6e3e..edd099d71 100644 --- a/src/osgPlugins/ffmpeg/CMakeLists.txt +++ b/src/osgPlugins/ffmpeg/CMakeLists.txt @@ -14,7 +14,7 @@ SET(TARGET_EXTERNAL_LIBRARIES ${FFMPEG_LIBRARIES} ) -IF (FFMPEG_LIBSWSCALE_FOUND) +IF(FFMPEG_LIBSWSCALE_FOUND) INCLUDE_DIRECTORIES( ${FFMPEG_LIBSWSCALE_INCLUDE_DIRS} ${FFMPEG_LIBSWSCALE_INCLUDE_DIRS}/libswscale ) diff --git a/src/osgPlugins/freetype/CMakeLists.txt b/src/osgPlugins/freetype/CMakeLists.txt index c703c9df2..72d5463f3 100644 --- a/src/osgPlugins/freetype/CMakeLists.txt +++ b/src/osgPlugins/freetype/CMakeLists.txt @@ -1,18 +1,22 @@ -#this file is automatically generated - - IF(WIN32) SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRT") -ENDIF(WIN32) +ENDIF() INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS} ) IF(APPLE) SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib") -ENDIF(APPLE) +ENDIF() -SET(TARGET_SRC FreeTypeFont.cpp FreeTypeFont3D.cpp FreeTypeLibrary.cpp ReaderWriterFreeType.cpp ) -SET(TARGET_H FreeTypeFont.h FreeTypeFont3D.h FreeTypeLibrary.h ) +SET(TARGET_SRC + FreeTypeFont.cpp + FreeTypeFont3D.cpp + FreeTypeLibrary.cpp + ReaderWriterFreeType.cpp ) +SET(TARGET_H + FreeTypeFont.h + FreeTypeFont3D.h + FreeTypeLibrary.h ) SET(TARGET_ADDED_LIBRARIES osgText ) SET(TARGET_LIBRARIES_VARS FREETYPE_LIBRARY ) #### end var setup ### diff --git a/src/osgPlugins/gecko/CMakeLists.txt b/src/osgPlugins/gecko/CMakeLists.txt index b0aecfa77..68c7e8d8d 100644 --- a/src/osgPlugins/gecko/CMakeLists.txt +++ b/src/osgPlugins/gecko/CMakeLists.txt @@ -47,17 +47,13 @@ SET(ALL_REQUIRED_XUL_INCLUDE_DIRS ${XUL_INCLUDE_DIR}/xpconnect ) -IF (WIN32 OR APPLE) - +IF(WIN32 OR APPLE) INCLUDE_DIRECTORIES(${ALL_REQUIRED_XUL_INCLUDE_DIRS} ) SET(TARGET_EXTERNAL_LIBRARIES ${XUL_LIBRARIES}) - -ELSE(WIN32 OR APPLE) - +ELSE() INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS} ${ALL_REQUIRED_XUL_INCLUDE_DIRS} ) SET(TARGET_EXTERNAL_LIBRARIES ${GTK_LIBRARIES} ${XUL_LIBRARIES}) - -ENDIF(WIN32 OR APPLE) +ENDIF() IF(CMAKE_COMPILER_IS_GNUCXX) diff --git a/src/osgPlugins/geo/CMakeLists.txt b/src/osgPlugins/geo/CMakeLists.txt index a39e834d5..121288dd1 100644 --- a/src/osgPlugins/geo/CMakeLists.txt +++ b/src/osgPlugins/geo/CMakeLists.txt @@ -1,18 +1,18 @@ -#this file is automatically generated - - -SET(TARGET_SRC ClipRegion.cpp ReaderWriterGEO.cpp geoActions.cpp ) +SET(TARGET_SRC + ClipRegion.cpp + ReaderWriterGEO.cpp + geoActions.cpp ) SET(TARGET_H -ClipRegion.h -geoCore.h -geoFormat.h -geoTypes.h -geoUnits.h -geoVersion.h -osgGeoAction.h -osgGeoAnimation.h -osgGeoNodes.h -osgGeoStructs.h + ClipRegion.h + geoCore.h + geoFormat.h + geoTypes.h + geoUnits.h + geoVersion.h + osgGeoAction.h + osgGeoAnimation.h + osgGeoNodes.h + osgGeoStructs.h ) SET(TARGET_ADDED_LIBRARIES osgSim osgText) #### end var setup ### diff --git a/src/osgPlugins/gif/CMakeLists.txt b/src/osgPlugins/gif/CMakeLists.txt index 0423f5a2b..642339af1 100644 --- a/src/osgPlugins/gif/CMakeLists.txt +++ b/src/osgPlugins/gif/CMakeLists.txt @@ -1,8 +1,4 @@ -#this file is automatically generated - - - INCLUDE_DIRECTORIES( ${GIFLIB_INCLUDE_DIR} ) - +INCLUDE_DIRECTORIES( ${GIFLIB_INCLUDE_DIR} ) SET(TARGET_SRC ReaderWriterGIF.cpp ) SET(TARGET_LIBRARIES_VARS GIFLIB_LIBRARY ) @@ -11,5 +7,4 @@ SETUP_PLUGIN(gif) IF(MSVC) SET_TARGET_PROPERTIES("${TARGET_DEFAULT_PREFIX}${TARGET_NAME}" PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT") -ENDIF(MSVC) - +ENDIF() diff --git a/src/osgPlugins/glsl/CMakeLists.txt b/src/osgPlugins/glsl/CMakeLists.txt index 2a3fbaffd..134510457 100644 --- a/src/osgPlugins/glsl/CMakeLists.txt +++ b/src/osgPlugins/glsl/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterGLSL.cpp ) #### end var setup ### SETUP_PLUGIN(glsl) diff --git a/src/osgPlugins/gz/CMakeLists.txt b/src/osgPlugins/gz/CMakeLists.txt index 975e6fd07..86acc1c6d 100644 --- a/src/osgPlugins/gz/CMakeLists.txt +++ b/src/osgPlugins/gz/CMakeLists.txt @@ -1,4 +1,3 @@ -#this file is automatically generated INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR} ) SET(TARGET_SRC diff --git a/src/osgPlugins/hdr/CMakeLists.txt b/src/osgPlugins/hdr/CMakeLists.txt index afc2de62e..c2330771e 100644 --- a/src/osgPlugins/hdr/CMakeLists.txt +++ b/src/osgPlugins/hdr/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterHDR.cpp hdrloader.cpp diff --git a/src/osgPlugins/ive/CMakeLists.txt b/src/osgPlugins/ive/CMakeLists.txt index 9620df7fa..36b4683f6 100644 --- a/src/osgPlugins/ive/CMakeLists.txt +++ b/src/osgPlugins/ive/CMakeLists.txt @@ -1,7 +1,7 @@ IF(ZLIB_FOUND) ADD_DEFINITIONS(-DUSE_ZLIB) INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR}) -ENDIF(ZLIB_FOUND) +ENDIF() SET(TARGET_SRC @@ -242,7 +242,7 @@ SET(TARGET_ADDED_LIBRARIES osgSim osgFX osgText osgTerrain) IF(ZLIB_FOUND) SET(TARGET_LIBRARIES_VARS ZLIB_LIBRARY) -ENDIF(ZLIB_FOUND) +ENDIF() #### end var setup ### SETUP_PLUGIN(ive) diff --git a/src/osgPlugins/jp2/CMakeLists.txt b/src/osgPlugins/jp2/CMakeLists.txt index 302ffc77b..b95537680 100644 --- a/src/osgPlugins/jp2/CMakeLists.txt +++ b/src/osgPlugins/jp2/CMakeLists.txt @@ -6,7 +6,7 @@ SET(TARGET_LIBRARIES_VARS JASPER_LIBRARY ) IF(WIN32) ADD_DEFINITIONS(-DJAS_WIN_MSVC_BUILD) -ENDIF(WIN32) +ENDIF() #### end var setup ### diff --git a/src/osgPlugins/jpeg/CMakeLists.txt b/src/osgPlugins/jpeg/CMakeLists.txt index 14cbdf64b..c3021cbe5 100644 --- a/src/osgPlugins/jpeg/CMakeLists.txt +++ b/src/osgPlugins/jpeg/CMakeLists.txt @@ -1,8 +1,4 @@ -#this file is automatically generated - - - INCLUDE_DIRECTORIES( ${JPEG_INCLUDE_DIR} ) - +INCLUDE_DIRECTORIES( ${JPEG_INCLUDE_DIR} ) SET(TARGET_SRC ReaderWriterJPEG.cpp ) SET(TARGET_LIBRARIES_VARS JPEG_LIBRARY ) diff --git a/src/osgPlugins/logo/CMakeLists.txt b/src/osgPlugins/logo/CMakeLists.txt index 203d9f881..b32eb6119 100644 --- a/src/osgPlugins/logo/CMakeLists.txt +++ b/src/osgPlugins/logo/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterLOGO.cpp ) #### end var setup ### SETUP_PLUGIN(logo) diff --git a/src/osgPlugins/lws/CMakeLists.txt b/src/osgPlugins/lws/CMakeLists.txt index aa5832be8..84a695888 100644 --- a/src/osgPlugins/lws/CMakeLists.txt +++ b/src/osgPlugins/lws/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterLWS.cpp SceneLoader.cpp ) SET(TARGET_H SceneLoader.h ) #### end var setup ### diff --git a/src/osgPlugins/md2/CMakeLists.txt b/src/osgPlugins/md2/CMakeLists.txt index 68fe965e2..132130c00 100644 --- a/src/osgPlugins/md2/CMakeLists.txt +++ b/src/osgPlugins/md2/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterMD2.cpp ) SET(TARGET_H anorms.h ) #### end var setup ### diff --git a/src/osgPlugins/net/CMakeLists.txt b/src/osgPlugins/net/CMakeLists.txt index 8e53c9fbe..2f7f9952c 100644 --- a/src/osgPlugins/net/CMakeLists.txt +++ b/src/osgPlugins/net/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterNET.cpp sockinet.cpp sockstream.cpp ) SET(TARGET_H sockinet.h sockstream.h ) SET(TARGET_EXTERNAL_LIBRARIES ${OSG_SOCKET_LIBS} ) diff --git a/src/osgPlugins/obj/CMakeLists.txt b/src/osgPlugins/obj/CMakeLists.txt index 6f32ca91e..50161c504 100644 --- a/src/osgPlugins/obj/CMakeLists.txt +++ b/src/osgPlugins/obj/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC OBJWriterNodeVisitor.cpp ReaderWriterOBJ.cpp diff --git a/src/osgPlugins/osg/CMakeLists.txt b/src/osgPlugins/osg/CMakeLists.txt index 0e6877aac..f5e82e801 100644 --- a/src/osgPlugins/osg/CMakeLists.txt +++ b/src/osgPlugins/osg/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC AlphaFunc.cpp AnimationPath.cpp diff --git a/src/osgPlugins/osgFX/CMakeLists.txt b/src/osgPlugins/osgFX/CMakeLists.txt index ffb6b3126..a5eaedfad 100644 --- a/src/osgPlugins/osgFX/CMakeLists.txt +++ b/src/osgPlugins/osgFX/CMakeLists.txt @@ -1,15 +1,13 @@ -#this file is automatically generated - - SET(TARGET_SRC -IO_AnisotropicLighting.cpp -IO_BumpMapping.cpp -IO_Cartoon.cpp -IO_Effect.cpp -IO_MultiTextureControl.cpp -IO_Scribe.cpp -IO_SpecularHighlights.cpp + IO_AnisotropicLighting.cpp + IO_BumpMapping.cpp + IO_Cartoon.cpp + IO_Effect.cpp + IO_MultiTextureControl.cpp + IO_Scribe.cpp + IO_SpecularHighlights.cpp ) + SET(TARGET_ADDED_LIBRARIES osgFX ) #### end var setup ### SETUP_PLUGIN(osgfx) diff --git a/src/osgPlugins/osgParticle/CMakeLists.txt b/src/osgPlugins/osgParticle/CMakeLists.txt index 74f70f33b..ffdefd5c1 100644 --- a/src/osgPlugins/osgParticle/CMakeLists.txt +++ b/src/osgPlugins/osgParticle/CMakeLists.txt @@ -1,39 +1,37 @@ -#this file is automatically generated - - SET(TARGET_SRC -IO_AccelOperator.cpp -IO_AngularAccelOperator.cpp -IO_BoxPlacer.cpp -IO_CenteredPlacer.cpp -IO_ConnectedParticleSystem.cpp -IO_ConstantRateCounter.cpp -IO_Emitter.cpp -IO_ExplosionDebrisEffect.cpp -IO_ExplosionEffect.cpp -IO_FireEffect.cpp -IO_FluidFrictionOperator.cpp -IO_FluidProgram.cpp -IO_ForceOperator.cpp -IO_LinearInterpolator.cpp -IO_ModularEmitter.cpp -IO_ModularProgram.cpp -IO_MultiSegmentPlacer.cpp -IO_Particle.cpp -IO_ParticleEffect.cpp -IO_ParticleProcessor.cpp -IO_ParticleSystem.cpp -IO_ParticleSystemUpdater.cpp -IO_PointPlacer.cpp -IO_Program.cpp -IO_RadialShooter.cpp -IO_RandomRateCounter.cpp -IO_SectorPlacer.cpp -IO_SegmentPlacer.cpp -IO_SmokeEffect.cpp -IO_SmokeTrailEffect.cpp -IO_VariableRateCounter.cpp + IO_AccelOperator.cpp + IO_AngularAccelOperator.cpp + IO_BoxPlacer.cpp + IO_CenteredPlacer.cpp + IO_ConnectedParticleSystem.cpp + IO_ConstantRateCounter.cpp + IO_Emitter.cpp + IO_ExplosionDebrisEffect.cpp + IO_ExplosionEffect.cpp + IO_FireEffect.cpp + IO_FluidFrictionOperator.cpp + IO_FluidProgram.cpp + IO_ForceOperator.cpp + IO_LinearInterpolator.cpp + IO_ModularEmitter.cpp + IO_ModularProgram.cpp + IO_MultiSegmentPlacer.cpp + IO_Particle.cpp + IO_ParticleEffect.cpp + IO_ParticleProcessor.cpp + IO_ParticleSystem.cpp + IO_ParticleSystemUpdater.cpp + IO_PointPlacer.cpp + IO_Program.cpp + IO_RadialShooter.cpp + IO_RandomRateCounter.cpp + IO_SectorPlacer.cpp + IO_SegmentPlacer.cpp + IO_SmokeEffect.cpp + IO_SmokeTrailEffect.cpp + IO_VariableRateCounter.cpp ) + SET(TARGET_ADDED_LIBRARIES osgParticle ) #### end var setup ### SETUP_PLUGIN(osgparticle) diff --git a/src/osgPlugins/osgTerrain/CMakeLists.txt b/src/osgPlugins/osgTerrain/CMakeLists.txt index 6fc278e61..b75b662fb 100644 --- a/src/osgPlugins/osgTerrain/CMakeLists.txt +++ b/src/osgPlugins/osgTerrain/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC Locator.cpp ImageLayer.cpp diff --git a/src/osgPlugins/osgText/CMakeLists.txt b/src/osgPlugins/osgText/CMakeLists.txt index adf69ac36..f53a07409 100644 --- a/src/osgPlugins/osgText/CMakeLists.txt +++ b/src/osgPlugins/osgText/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC IO_TextBase.cpp IO_Text.cpp IO_Text3D.cpp ) SET(TARGET_ADDED_LIBRARIES osgText ) #### end var setup ### diff --git a/src/osgPlugins/osgWidget/CMakeLists.txt b/src/osgPlugins/osgWidget/CMakeLists.txt index 79724259d..1f990a185 100644 --- a/src/osgPlugins/osgWidget/CMakeLists.txt +++ b/src/osgPlugins/osgWidget/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC Box.cpp EmbeddedWindow.cpp diff --git a/src/osgPlugins/osga/CMakeLists.txt b/src/osgPlugins/osga/CMakeLists.txt index 4fed178e1..7effa11ff 100644 --- a/src/osgPlugins/osga/CMakeLists.txt +++ b/src/osgPlugins/osga/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC OSGA_Archive.cpp ReaderWriterOSGA.cpp ) SET(TARGET_H OSGA_Archive.h ) #### end var setup ### diff --git a/src/osgPlugins/osgtgz/CMakeLists.txt b/src/osgPlugins/osgtgz/CMakeLists.txt index fb1d1dc59..7e0dabbfc 100644 --- a/src/osgPlugins/osgtgz/CMakeLists.txt +++ b/src/osgPlugins/osgtgz/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterOSGTGZ.cpp ) #### end var setup ### SETUP_PLUGIN(osgtgz) diff --git a/src/osgPlugins/pfb/CMakeLists.txt b/src/osgPlugins/pfb/CMakeLists.txt index afe2807bf..0a7e7f07f 100644 --- a/src/osgPlugins/pfb/CMakeLists.txt +++ b/src/osgPlugins/pfb/CMakeLists.txt @@ -13,11 +13,11 @@ IF(MSVC) SET(TARGET_EXTERNAL_LIBRARIES libpfdu-util ) -ELSE(MSVC) +ELSE() SET(TARGET_EXTERNAL_LIBRARIES pfdu pfutil ) -ENDIF(MSVC) +ENDIF() SET(TARGET_LIBRARIES_VARS PERFORMER_LIBRARY ) diff --git a/src/osgPlugins/pic/CMakeLists.txt b/src/osgPlugins/pic/CMakeLists.txt index 57681366a..88b0b89d0 100644 --- a/src/osgPlugins/pic/CMakeLists.txt +++ b/src/osgPlugins/pic/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterPIC.cpp ) #### end var setup ### SETUP_PLUGIN(pic) diff --git a/src/osgPlugins/png/CMakeLists.txt b/src/osgPlugins/png/CMakeLists.txt index bfb9fe916..feeb14cd2 100644 --- a/src/osgPlugins/png/CMakeLists.txt +++ b/src/osgPlugins/png/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) @@ -11,5 +8,5 @@ SETUP_PLUGIN(png) IF(MSVC) SET_TARGET_PROPERTIES("${TARGET_DEFAULT_PREFIX}${TARGET_NAME}" PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT") -ENDIF(MSVC) +ENDIF() diff --git a/src/osgPlugins/quicktime/CMakeLists.txt b/src/osgPlugins/quicktime/CMakeLists.txt index cf180faf5..f80ac6774 100644 --- a/src/osgPlugins/quicktime/CMakeLists.txt +++ b/src/osgPlugins/quicktime/CMakeLists.txt @@ -1,6 +1,6 @@ IF(WIN32) SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRT") -ENDIF(WIN32) +ENDIF() INCLUDE_DIRECTORIES(${QUICKTIME_INCLUDE_DIR}) diff --git a/src/osgPlugins/rgb/CMakeLists.txt b/src/osgPlugins/rgb/CMakeLists.txt index b0750ae50..53c846107 100644 --- a/src/osgPlugins/rgb/CMakeLists.txt +++ b/src/osgPlugins/rgb/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterRGB.cpp ) #### end var setup ### SETUP_PLUGIN(rgb) diff --git a/src/osgPlugins/rot/CMakeLists.txt b/src/osgPlugins/rot/CMakeLists.txt index 1a0496694..989639a53 100644 --- a/src/osgPlugins/rot/CMakeLists.txt +++ b/src/osgPlugins/rot/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterROT.cpp ) #### end var setup ### SETUP_PLUGIN(rot) diff --git a/src/osgPlugins/scale/CMakeLists.txt b/src/osgPlugins/scale/CMakeLists.txt index 5ee5f6abc..2aaa0cee7 100644 --- a/src/osgPlugins/scale/CMakeLists.txt +++ b/src/osgPlugins/scale/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterSCALE.cpp ) #### end var setup ### SETUP_PLUGIN(scale) diff --git a/src/osgPlugins/shp/CMakeLists.txt b/src/osgPlugins/shp/CMakeLists.txt index 0101731c8..1819fe1d4 100644 --- a/src/osgPlugins/shp/CMakeLists.txt +++ b/src/osgPlugins/shp/CMakeLists.txt @@ -1,5 +1,14 @@ -SET(TARGET_SRC ESRIShape.cpp ESRIShapeParser.cpp ESRIShapeReaderWriter.cpp XBaseParser.cpp) -SET(TARGET_H ESRIShape.h ESRIShapeParser.h XBaseParser.h) -SET(TARGET_ADDED_LIBRARIES osgSim osgTerrain) +SET(TARGET_SRC + ESRIShape.cpp + ESRIShapeParser.cpp + ESRIShapeReaderWriter.cpp + XBaseParser.cpp) +SET(TARGET_H + ESRIShape.h + ESRIShapeParser.h + XBaseParser.h) +SET(TARGET_ADDED_LIBRARIES + osgSim + osgTerrain) #### end var setup ### SETUP_PLUGIN(shp) diff --git a/src/osgPlugins/stl/CMakeLists.txt b/src/osgPlugins/stl/CMakeLists.txt index b73045042..79da1386d 100644 --- a/src/osgPlugins/stl/CMakeLists.txt +++ b/src/osgPlugins/stl/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterSTL.cpp ) #### end var setup ### SETUP_PLUGIN(stl) diff --git a/src/osgPlugins/svg/CMakeLists.txt b/src/osgPlugins/svg/CMakeLists.txt index 0c490d9e9..8727c7543 100644 --- a/src/osgPlugins/svg/CMakeLists.txt +++ b/src/osgPlugins/svg/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - INCLUDE_DIRECTORIES( ${RSVG_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS}) LINK_DIRECTORIES(${RSVG_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) LINK_LIBRARIES(${RSVG_LIBRARIES} ${CAIRO_LIBRARIES}) diff --git a/src/osgPlugins/tga/CMakeLists.txt b/src/osgPlugins/tga/CMakeLists.txt index 660e5c496..60e4c5473 100644 --- a/src/osgPlugins/tga/CMakeLists.txt +++ b/src/osgPlugins/tga/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterTGA.cpp ) #### end var setup ### SETUP_PLUGIN(tga) diff --git a/src/osgPlugins/tgz/CMakeLists.txt b/src/osgPlugins/tgz/CMakeLists.txt index 40dc8f27d..9c51e036c 100644 --- a/src/osgPlugins/tgz/CMakeLists.txt +++ b/src/osgPlugins/tgz/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterTGZ.cpp ) #### end var setup ### SETUP_PLUGIN(tgz) diff --git a/src/osgPlugins/trans/CMakeLists.txt b/src/osgPlugins/trans/CMakeLists.txt index 4415c5e3c..be4b5cba4 100644 --- a/src/osgPlugins/trans/CMakeLists.txt +++ b/src/osgPlugins/trans/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterTRANS.cpp ) #### end var setup ### SETUP_PLUGIN(trans) diff --git a/src/osgPlugins/txp/CMakeLists.txt b/src/osgPlugins/txp/CMakeLists.txt index 0685e8c6f..1013bbe69 100644 --- a/src/osgPlugins/txp/CMakeLists.txt +++ b/src/osgPlugins/txp/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterTXP.cpp TileMapper.cpp diff --git a/src/osgPlugins/vnc/CMakeLists.txt b/src/osgPlugins/vnc/CMakeLists.txt index 09550e85f..6dff71b9d 100644 --- a/src/osgPlugins/vnc/CMakeLists.txt +++ b/src/osgPlugins/vnc/CMakeLists.txt @@ -2,7 +2,10 @@ SET(TARGET_SRC ReaderWriterVNC.cpp ) INCLUDE_DIRECTORIES(${LIBVNCCLIENT_INCLUDE_DIR}) -SET(TARGET_EXTERNAL_LIBRARIES ${LIBVNCCLIENT_LIBRARY} ${ZLIB_LIBRARY} ${JPEG_LIBRARY} ) +SET(TARGET_EXTERNAL_LIBRARIES + ${LIBVNCCLIENT_LIBRARY} + ${ZLIB_LIBRARY} + ${JPEG_LIBRARY} ) SET(TARGET_ADDED_LIBRARIES osgWidget ) diff --git a/src/osgPlugins/vrml/CMakeLists.txt b/src/osgPlugins/vrml/CMakeLists.txt index 248ec64e3..16720b164 100644 --- a/src/osgPlugins/vrml/CMakeLists.txt +++ b/src/osgPlugins/vrml/CMakeLists.txt @@ -1,24 +1,46 @@ +INCLUDE_DIRECTORIES(${OPENVRML_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${OPENVRML_INCLUDE_DIR}/openvrml) + IF (WIN32) - INCLUDE_DIRECTORIES( ${OPENVRML_INCLUDE_DIR} ${OPENVRML_INCLUDE_DIR}/openvrml ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) - FIND_LIBRARY(OPENVRML_ANTLR_LIBRARY NAMES antlr.lib PATHS $ENV{OPENVRML_DIR}/lib) - FIND_LIBRARY(OPENVRML_ANTLR_LIBRARY_DEBUG NAMES antlrd.lib PATHS $ENV{OPENVRML_DIR}/lib) - FIND_LIBRARY(OPENVRML_REGEX_LIBRARY NAMES regex.lib PATHS $ENV{OPENVRML_DIR}/lib) - FIND_LIBRARY(OPENVRML_REGEX_LIBRARY_DEBUG NAMES regexd.lib PATHS $ENV{OPENVRML_DIR}/lib) - SET(TARGET_LIBRARIES_VARS OPENVRML_ANTLR_LIBRARY OPENVRML_REGEX_LIBRARY OPENVRML_LIBRARY JPEG_LIBRARY PNG_LIBRARY ZLIB_LIBRARY) - SET(TARGET_EXTERNAL_LIBRARIES Ws2_32.lib) -ELSE(WIN32) - INCLUDE_DIRECTORIES( ${OPENVRML_INCLUDE_DIR} ${OPENVRML_INCLUDE_DIR}/openvrml) - SET(TARGET_LIBRARIES_VARS OPENVRML_LIBRARY) -ENDIF(WIN32) + INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) + INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR}) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) + + FIND_LIBRARY(OPENVRML_ANTLR_LIBRARY + NAMES antlr.lib + PATHS $ENV{OPENVRML_DIR}/lib) + FIND_LIBRARY(OPENVRML_ANTLR_LIBRARY_DEBUG + NAMES antlrd.lib + PATHS $ENV{OPENVRML_DIR}/lib) + FIND_LIBRARY(OPENVRML_REGEX_LIBRARY + NAMES regex.lib + PATHS $ENV{OPENVRML_DIR}/lib) + FIND_LIBRARY(OPENVRML_REGEX_LIBRARY_DEBUG + NAMES regexd.lib + PATHS $ENV{OPENVRML_DIR}/lib) + + SET(TARGET_LIBRARIES_VARS + OPENVRML_ANTLR_LIBRARY + OPENVRML_REGEX_LIBRARY + OPENVRML_LIBRARY + JPEG_LIBRARY + PNG_LIBRARY + ZLIB_LIBRARY) + SET(TARGET_EXTERNAL_LIBRARIES + Ws2_32.lib) +ELSE() + SET(TARGET_LIBRARIES_VARS + OPENVRML_LIBRARY) +ENDIF() SET(TARGET_SRC - IndexedFaceSet.cpp - Primitives.cpp - ReaderWriterVRML2.cpp + IndexedFaceSet.cpp + Primitives.cpp + ReaderWriterVRML2.cpp ) SET(TARGET_H - ReaderWriterVRML2.h + ReaderWriterVRML2.h ) #### end var setup ### diff --git a/src/osgPlugins/vtf/CMakeLists.txt b/src/osgPlugins/vtf/CMakeLists.txt index f64ddac8d..ad76f2a1a 100644 --- a/src/osgPlugins/vtf/CMakeLists.txt +++ b/src/osgPlugins/vtf/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterVTF.cpp ) #### end var setup ### SETUP_PLUGIN(vtf) diff --git a/src/osgPlugins/x/CMakeLists.txt b/src/osgPlugins/x/CMakeLists.txt index bb5811010..14d49c98c 100644 --- a/src/osgPlugins/x/CMakeLists.txt +++ b/src/osgPlugins/x/CMakeLists.txt @@ -1,7 +1,11 @@ -#this file is automatically generated - - -SET(TARGET_SRC ReaderWriterDirectX.cpp directx.cpp mesh.cpp types.cpp ) -SET(TARGET_H directx.h mesh.h types.h ) +SET(TARGET_SRC + ReaderWriterDirectX.cpp + directx.cpp + mesh.cpp + types.cpp ) +SET(TARGET_H + directx.h + mesh.h + types.h ) #### end var setup ### SETUP_PLUGIN(x) diff --git a/src/osgPlugins/xine/CMakeLists.txt b/src/osgPlugins/xine/CMakeLists.txt index b69ee38c9..8731b7ceb 100644 --- a/src/osgPlugins/xine/CMakeLists.txt +++ b/src/osgPlugins/xine/CMakeLists.txt @@ -9,7 +9,7 @@ SET(TARGET_LIBRARIES_VARS XINE_LIBRARY ) IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations") -ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF() #### end var setup ### diff --git a/src/osgPlugins/zip/CMakeLists.txt b/src/osgPlugins/zip/CMakeLists.txt index 7a65e7412..62f261552 100644 --- a/src/osgPlugins/zip/CMakeLists.txt +++ b/src/osgPlugins/zip/CMakeLists.txt @@ -1,6 +1,3 @@ -#this file is automatically generated - - SET(TARGET_SRC ReaderWriterZIP.cpp ) #### end var setup ### SETUP_PLUGIN(zip)