#------------------------------------------------------------------- # This file is part of the CMake build system for Hydrax # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ############################################################ # Hydrax core library ############################################################ PROJECT(hydrax) # define header and source files for the library set (HYDRAX_HEADER_FILES include/Hydrax.h include/HydraxCfgFileManager.h include/HydraxDecalsManager.h include/HydraxEnums.h include/HydraxGodRaysManager.h include/HydraxGPUNormalMapManager.h include/HydraxHelp.h include/HydraxImage.h include/HydraxMaterialManager.h include/HydraxMesh.h include/HydraxPrerequisites.h include/HydraxRttManager.h include/HydraxTextureManager.h) set (HYDRAX_SOURCE_FILES src/Hydrax.cpp src/HydraxCfgFileManager.cpp src/HydraxDecalsManager.cpp src/HydraxEnums.cpp src/HydraxGodRaysManager.cpp src/HydraxGPUNormalMapManager.cpp src/HydraxHelp.cpp src/HydraxImage.cpp src/HydraxMaterialManager.cpp src/HydraxMesh.cpp src/HydraxPrerequisites.cpp src/HydraxRttManager.cpp src/HydraxTextureManager.cpp) set (MODULES_HEADER_FILES include/Modules/HydraxModule.h) set (MODULES_SOURCE_FILES src/Modules/HydraxModule.cpp) set (PROJECTED_GRID_HEADER_FILES include/Modules/ProjectedGrid/HydraxProjectedGrid.h) set (PROJECTED_GRID_SOURCE_FILES src/Modules/ProjectedGrid/HydraxProjectedGrid.cpp) set (RADIAL_GRID_HEADER_FILES include/Modules/RadialGrid/HydraxRadialGrid.h) set (RADIAL_GRID_SOURCE_FILES src/Modules/RadialGrid/HydraxRadialGrid.cpp) set (SIMPLE_GRID_HEADER_FILES include/Modules/SimpleGrid/HydraxSimpleGrid.h) set (SIMPLE_GRID_SOURCE_FILES src/Modules/SimpleGrid/HydraxSimpleGrid.cpp) set (NOISES_HEADER_FILES include/Noise/HydraxNoise.h) set (NOISES_SOURCE_FILES src/Noise/HydraxNoise.cpp) set (FFT_HEADER_FILES include/Noise/FFT/HydraxFFT.h) set (FFT_SOURCE_FILES src/Noise/FFT/HydraxFFT.cpp) set (PERLIN_HEADER_FILES include/Noise/Perlin/HydraxPerlin.h) set (PERLIN_SOURCE_FILES src/Noise/Perlin/HydraxPerlin.cpp) set (REAL_HEADER_FILES include/Noise/Real/HydraxPressurePoint.h include/Noise/Real/HydraxReal.h include/Noise/Real/HydraxWave.h) set (REAL_SOURCE_FILES src/Noise/Real/HydraxPressurePoint.cpp src/Noise/Real/HydraxReal.cpp src/Noise/Real/HydraxWave.cpp) # Create files groups for IDE. source_group(Header\ Files\\Modules FILES ${MODULES_HEADER_FILES}) source_group(Source\ Files\\Modules FILES ${MODULES_SOURCE_FILES}) source_group(Header\ Files\\Modules\\ProjectedGrid FILES ${PROJECTED_GRID_HEADER_FILES}) source_group(Source\ Files\\Modules\\ProjectedGrid FILES ${PROJECTED_GRID_SOURCE_FILES}) source_group(Header\ Files\\Modules\\RadialGrid FILES ${RADIAL_GRID_HEADER_FILES}) source_group(Source\ Files\\Modules\\RadialGrid FILES ${RADIAL_GRID_SOURCE_FILES}) source_group(Header\ Files\\Modules\\SimpleGrid FILES ${SIMPLE_GRID_HEADER_FILES}) source_group(Source\ Files\\Modules\\SimpleGrid FILES ${SIMPLE_GRID_SOURCE_FILES}) source_group(Header\ Files\\Noise FILES ${NOISES_HEADER_FILES}) source_group(Source\ Files\\Noise FILES ${NOISES_SOURCE_FILES}) source_group(Header\ Files\\Noise\\FFT FILES ${FFT_HEADER_FILES}) source_group(Source\ Files\\Noise\\FFT FILES ${FFT_SOURCE_FILES}) source_group(Header\ Files\\Noise\\Perlin FILES ${PERLIN_HEADER_FILES}) source_group(Source\ Files\\Noise\\Perlin FILES ${PERLIN_SOURCE_FILES}) source_group(Header\ Files\\Noise\\Real FILES ${REAL_HEADER_FILES}) source_group(Source\ Files\\Noise\\Real FILES ${REAL_SOURCE_FILES}) # Add needed definitions and nedmalloc include dir add_definitions(-DHYDRAX_LIB -D_MT -D_USRDLL) # Add static flag if needed if(HYDRAX_STATIC) add_definitions(-DHYDRAX_STATIC_LIB) endif() if (UNIX) set(PLATFORM_LIBS dl) endif() set(LIBRARIES ${OGRE_LIBRARIES} ${PLATFORM_LIBS}) # setup Hydrax target add_library(hydrax ${HYDRAX_LIB_TYPE} ${HYDRAX_HEADER_FILES} ${HYDRAX_SOURCE_FILES} ${MODULES_HEADER_FILES} ${MODULES_SOURCE_FILES} ${PROJECTED_GRID_HEADER_FILES} ${PROJECTED_GRID_SOURCE_FILES} ${RADIAL_GRID_HEADER_FILES} ${RADIAL_GRID_SOURCE_FILES} ${SIMPLE_GRID_HEADER_FILES} ${SIMPLE_GRID_SOURCE_FILES} ${NOISES_HEADER_FILES} ${NOISES_HEADER_FILES} ${NOISES_SOURCE_FILES} ${FFT_HEADER_FILES} ${FFT_SOURCE_FILES} ${PERLIN_HEADER_FILES} ${PERLIN_SOURCE_FILES} ${REAL_HEADER_FILES} ${REAL_SOURCE_FILES}) set_target_properties(hydrax PROPERTIES VERSION ${HYDRAX_VERSION} SOVERSION ${HYDRAX_VERSION_MAJOR}) target_link_libraries(hydrax ${LIBRARIES}) # Configure Hydrax hydrax_config_lib(hydrax) ############################################################### # install targets ############################################################### install(FILES ${HYDRAX_HEADER_FILES} DESTINATION include/HYDRAX) install(FILES ${MODULES_HEADER_FILES} DESTINATION include/HYDRAX/Modules) install(FILES ${PROJECTED_GRID_HEADER_FILES} DESTINATION include/HYDRAX/Modules/ProjectedGrid) install(FILES ${RADIAL_GRID_HEADER_FILES} DESTINATION include/HYDRAX/Modules/RadialGrid) install(FILES ${SIMPLE_GRID_HEADER_FILES} DESTINATION include/HYDRAX/Modules/SimpleGrid) install(FILES ${NOISES_HEADER_FILES} DESTINATION include/HYDRAX/Noise) install(FILES ${FFT_HEADER_FILES} DESTINATION include/HYDRAX/Noise/FFT) install(FILES ${PERLIN_HEADER_FILES} DESTINATION include/HYDRAX/Noise/Perlin) install(FILES ${REAL_HEADER_FILES} DESTINATION include/HYDRAX/Noise/Real)