mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-02-21 03:10:51 +00:00
CMake: Create config.h
Use config.h for configure time settings.
This commit is contained in:
parent
9ee84519fa
commit
6dfe95e732
3 changed files with 14 additions and 4 deletions
|
@ -88,10 +88,7 @@ include_directories(${JPEG_INCLUDE_DIR})
|
|||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${JPEG_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARY})
|
||||
CHECK_FUNCTION_EXISTS("jpeg_mem_src" jpeg_has_mem_src)
|
||||
if (jpeg_has_mem_src)
|
||||
add_definitions(-DHAVE_JPEG_MEM_SRC)
|
||||
endif ()
|
||||
CHECK_FUNCTION_EXISTS("jpeg_mem_src" HAVE_JPEG_MEM_SRC)
|
||||
|
||||
find_package(OGG REQUIRED)
|
||||
include_directories(${OGG_INCLUDE_DIR})
|
||||
|
@ -231,6 +228,11 @@ if (WIN32)
|
|||
)
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_SOURCE_DIR}/config.h.in"
|
||||
"${CMAKE_BINARY_DIR}/config.h"
|
||||
)
|
||||
|
||||
message(STATUS "Building ${CMAKE_BUILD_TYPE} for ${os}.${cpu}")
|
||||
|
||||
set(src_renderer
|
||||
|
@ -695,6 +697,7 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
|
||||
add_library(idlib STATIC ${src_idlib})
|
||||
|
|
6
config.h.in
Normal file
6
config.h.in
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef __DOOM3_CONFIG_H__
|
||||
#define __DOOM3_CONFIG_H__
|
||||
|
||||
#cmakedefine HAVE_JPEG_MEM_SRC
|
||||
|
||||
#endif
|
|
@ -29,6 +29,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#ifndef __PLATFORM__
|
||||
#define __PLATFORM__
|
||||
|
||||
#include "config.h"
|
||||
#include "framework/BuildDefines.h"
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue