Added missing .cmake files

pull/247/head
Oliver Smith 2 years ago
parent 8deeab8465
commit d722e02487
  1. 23
      cmake/PeglibCompileOptions.cmake
  2. 15
      cmake/PeglibIncludePaths.cmake

@ -0,0 +1,23 @@
include_guard(GLOBAL)
if(MSVC)
target_compile_options(
CppPegLib
INTERFACE
/Zc:__cplusplus
/utf-8
/D_CRT_SECURE_NO_DEPRECATE
/W3
)
else()
target_compile_options(
CppPegLib
INTERFACE
-Wall
-Wextra
)
endif()

@ -0,0 +1,15 @@
include_guard(GLOBAL)
# When building via cmakelists like this, the peglib.h file is located
# simply at the top of the peglib source tree.
get_target_property(_source_folder CppPegLib SOURCE_FOLDER)
target_include_directories(
CppPegLib
INTERFACE
${_source_folder}
)
unset(_source_folder)
Loading…
Cancel
Save