Code View

mstring / mstring-1.3.1.2 / src / CMakeLists.txt
set(MSTRING_SOURCE
  main.cpp
  MException.cpp
  MFormat.cpp
  MIncludes.cpp
  MMessage.cpp
  MNamespace.cpp
  MParameter.cpp
  MString.cpp
  MStringParser.cpp
  MText.cpp
  MUsing.cpp
  MUtil.cpp
  MWriter.cpp
  Message.cpp
  Settings.cpp
)

add_executable( mstring ${MSTRING_SOURCE} )
target_include_directories( mstring PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
target_link_libraries( mstring PRIVATE cparse::cparse )
# A build step runs mstring outside any Conan/IDE environment, so it must
# find libcparse on its own: installed, it looks next to itself (../lib),
# where the Conan package puts a copy (conanfile.py package()).
set_target_properties( mstring PROPERTIES
  INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" )
target_compile_definitions( mstring PRIVATE
  MSTRING_VERSION="${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" )
target_compile_options( mstring PRIVATE -Wall -Wextra -Wpedantic )