From 2e1c7c37e7aa3edbf01ced3db6139a655f50c5f2 Mon Sep 17 00:00:00 2001 From: carl Date: Tue, 19 Feb 2019 00:30:01 +0800 Subject: [PATCH] Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. + Convert to sed scripts some shell scripts for better portability. + Reduce usage of em_path.h --- h/CMakeLists.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 h/CMakeLists.txt diff --git a/h/CMakeLists.txt b/h/CMakeLists.txt new file mode 100644 index 000000000..1dcc98c71 --- /dev/null +++ b/h/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required (VERSION 3.0) +project(emheaders) + +# Create an include only library to be used +# for easier dependency management. + +# Created when generating the CMake file. +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/local.h "#define VERSION 3") +file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/local.h "#define ACKM ") +file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/local.h "#define BIGMACHINE 1") +file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/local.h "#define SYS_5") + + +add_library(${PROJECT_NAME} INTERFACE) +target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + + +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include +) + + +