53 lines
1.6 KiB
CMake
53 lines
1.6 KiB
CMake
|
cmake_minimum_required(VERSION 3.25)
|
||
|
project(sc3dev
|
||
|
VERSION 0.0.1
|
||
|
LANGUAGES CXX
|
||
|
HOMEPAGE_URL "https://git.wntrmute.dev/sc/sc3dev"
|
||
|
DESCRIPTION "")
|
||
|
set(CMAKE_CXX_STANDARD 17)
|
||
|
set(CMAKE_VERBOSE_MAKEFILES ON)
|
||
|
|
||
|
find_package(scsl REQUIRED)
|
||
|
|
||
|
include(CTest)
|
||
|
enable_testing()
|
||
|
|
||
|
# compile options:
|
||
|
# -Wall Default to all errors.
|
||
|
# -Wextra And a few extra.
|
||
|
# -Werror And require them to be fixed to build.
|
||
|
# -Wno-unused-function This is a library. Not every function is used here.
|
||
|
# -Wno-unused-parameter Some functions have parameters defined for compatibility,
|
||
|
# and aren't used in the implementation.
|
||
|
add_compile_options(
|
||
|
"-static"
|
||
|
"-Wall"
|
||
|
"-Wextra"
|
||
|
"-Werror"
|
||
|
"-Wno-unused-function"
|
||
|
"-Wno-unused-parameter"
|
||
|
"-g"
|
||
|
"$<$<CONFIG:RELEASE>:-O2>"
|
||
|
)
|
||
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||
|
add_compile_options("-stdlib=libc++")
|
||
|
else ()
|
||
|
# nothing special for gcc at the moment
|
||
|
endif ()
|
||
|
|
||
|
set(HEADERS)
|
||
|
set(SOURCES)
|
||
|
|
||
|
include_directories(SYSTEM include)
|
||
|
|
||
|
### THE REAL TARGETS ###
|
||
|
|
||
|
add_executable(${PROJECT_NAME}-packager src/packager.cc ${SOURCES} ${HEADERS})
|
||
|
target_link_libraries(${PROJECT_NAME}-packager ${SCSL_LIBRARIES})
|
||
|
|
||
|
### INCLUDES ###
|
||
|
|
||
|
#include(cmake/docs.cmake)
|
||
|
#include(cmake/install.cmake)
|
||
|
#include(cmake/packaging.cmake)
|