fix cmake build issue. fix build type checker. rm IronPad windows header including under linux

This commit is contained in:
2023-09-25 21:45:53 +08:00
parent 8083633a7b
commit 0a168ac5cc
6 changed files with 115 additions and 18 deletions

View File

@ -13,9 +13,7 @@ if ((NOT EXISTS "${STB_IMAGE_PATH}/stb_image.h") OR (NOT EXISTS "${STB_IMAGE_PAT
message(FATAL_ERROR "Invalid stb_image library path.")
endif ()
# set standard
set(CMAKE_CXX_STANDARD 20)
# set up file list
set(libcmo_headers ".")
set(libcmo_vt_src
@ -84,7 +82,14 @@ PRIVATE
${Iconv_INCLUDE_DIRS}
)
# add essential build macro
# set project standard
set_target_properties(LibCmo
PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED 20
CXX_EXTENSION OFF
)
# add essential build macro and populate them
target_compile_definitions(LibCmo
PUBLIC
$<$<CONFIG:Debug>:LIBCMO_BUILD_DEBUG>

View File

@ -1,7 +1,7 @@
#pragma once
#if !defined(LIBCMO_BUILD_DEBUG) && !defined(LIBCMO_BUILD_RELEASE)
#error "You must define LIBCMO_BUILD_DEBUG or LIBCMO_BUILD_RELEASE to indicate build type!"
#if !(defined(LIBCMO_BUILD_DEBUG) ^ defined(LIBCMO_BUILD_RELEASE))
#error "You must define ONE of LIBCMO_BUILD_DEBUG and LIBCMO_BUILD_RELEASE to indicate build type!"
#endif
// https://stackoverflow.com/questions/2164827/explicitly-exporting-shared-library-functions-in-linux