mirror of
https://github.com/ksherlock/mpw-shell.git
synced 2025-01-03 02:29:24 +00:00
generate config.h via CMake.
This commit is contained in:
parent
2893f7fe79
commit
0422976719
@ -1,11 +1,25 @@
|
|||||||
|
|
||||||
# CMAKE_INSTALL_PREFIX defaults to /usr/local.
|
# CMAKE_INSTALL_PREFIX defaults to /usr/local.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
project("mpw-shell")
|
project("mpw-shell")
|
||||||
set (PROJECT_TYPE "CXX")
|
set (PROJECT_TYPE "CXX")
|
||||||
set (PROJECT_NAME "MPW Shell")
|
set (PROJECT_NAME "MPW Shell")
|
||||||
|
|
||||||
|
#
|
||||||
|
# build config.h
|
||||||
|
#
|
||||||
|
|
||||||
|
INCLUDE (CheckFunctionExists)
|
||||||
|
SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h)
|
||||||
|
CHECK_FUNCTION_EXISTS(dprintf HAVE_DPRINTF)
|
||||||
|
SET(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
|
||||||
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-g -Wall -Wno-unused-variable -Wno-multichar -O1")
|
set(CMAKE_CXX_FLAGS "-g -Wall -Wno-unused-variable -Wno-multichar -O1")
|
||||||
|
|
||||||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
|
7
config.h.in
Normal file
7
config.h.in
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef __mpw_shell_config_h__
|
||||||
|
#define __mpw_shell_config_h__
|
||||||
|
|
||||||
|
#cmakedefine HAVE_DPRINTF
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user