#------------------------------------------------------------------- # This file is part of the CMake build system for SkyX # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ############################################################ # SkyX core library ############################################################ PROJECT(SkyX) add_subdirectory(media) # define header and source files for the library set (SKYX_HEADER_FILES include/SkyxAstronomicalModel.h include/SkyxAstronomicalModelBasic.h include/SkyxAtmosphereManager.h include/SkyxCloudsManager.h include/SkyxColorGradient.h include/SkyxGPUManager.h include/SkyxMeshManager.h include/SkyxMoonManager.h include/SkyxPrerequisites.h include/Skyx.h include/SkyxVCloudsManager.h ) set (SKYX_SOURCE_FILES src/SkyxAstronomicalModel.cpp src/SkyxAstronomicalModelBasic.cpp src/SkyxAtmosphereManager.cpp src/SkyxCloudsManager.cpp src/SkyxColorGradient.cpp src/SkyxGPUManager.cpp src/SkyxMeshManager.cpp src/SkyxMoonManager.cpp src/Skyx.cpp src/SkyxVCloudsManager.cpp ) set (VCLOUDS_HEADER_FILES include/VClouds/SkyxDataManager.h include/VClouds/SkyxEllipsoid.h include/VClouds/SkyxFastFakeRandom.h include/VClouds/SkyxGeometryBlock.h include/VClouds/SkyxGeometryManager.h include/VClouds/SkyxVClouds.h ) set (VCLOUDS_SOURCE_FILES src/VClouds/SkyxDataManager.cpp src/VClouds/SkyxEllipsoid.cpp src/VClouds/SkyxFastFakeRandom.cpp src/VClouds/SkyxGeometryBlock.cpp src/VClouds/SkyxGeometryManager.cpp src/VClouds/SkyxVClouds.cpp ) # Create files groups for IDE. source_group(Header\ Files\\VClouds FILES ${VCLOUDS_HEADER_FILES}) source_group(Source\ Files\\VClouds FILES ${VCLOUDS_SOURCE_FILES}) # Add needed definitions and nedmalloc include dir add_definitions(-DSKYX_NON_CLIENT_BUILD -D_MT -D_USRDLL) # Add static flag if needed if(SKYX_STATIC) add_definitions(-DSKYX_STATIC_LIB) endif() if (UNIX) set(PLATFORM_LIBS dl) endif() set(LIBRARIES ${OGRE_LIBRARIES} ${PLATFORM_LIBS} ) # setup SkyX target add_library(SkyX ${SKYX_LIB_TYPE} ${SKYX_HEADER_FILES} ${SKYX_SOURCE_FILES} ${VCLOUDS_HEADER_FILES} ${VCLOUDS_SOURCE_FILES} ) set_target_properties(SkyX PROPERTIES VERSION ${SKYX_VERSION} SOVERSION ${SKYX_VERSION_MAJOR}) target_link_libraries(SkyX ${LIBRARIES}) # Configure SkyX skyx_config_lib(SkyX) ############################################################### # install targets ############################################################### install(FILES ${SKYX_HEADER_FILES} DESTINATION include/SKYX ) install(FILES ${VCLOUDS_HEADER_FILES} DESTINATION include/SKYX/VClouds )