mirror of https://github.com/gityf/crc.git
added support of the cmake build system
parent
3455c68468
commit
29065889d0
@ -0,0 +1,28 @@
|
|||||||
|
# C++ objects and libs
|
||||||
|
*.slo
|
||||||
|
*.lo
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
*.lai
|
||||||
|
*.so
|
||||||
|
*.dll
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# cmake
|
||||||
|
|
||||||
|
CMakeLists.txt.user
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
CMakeScripts
|
||||||
|
Testing
|
||||||
|
Makefile
|
||||||
|
cmake_install.cmake
|
||||||
|
install_manifest.txt
|
||||||
|
compile_commands.json
|
||||||
|
CTestTestfile.cmake
|
||||||
|
_deps
|
||||||
|
|
||||||
|
|
||||||
|
# git
|
||||||
|
*.orig
|
@ -0,0 +1,30 @@
|
|||||||
|
if(DEFINED CRC_LIBRARY)
|
||||||
|
return()
|
||||||
|
else()
|
||||||
|
set(CRC_LIBRARY 1)
|
||||||
|
add_definitions(-DCRC_LIBRARY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project(CRC)
|
||||||
|
|
||||||
|
if(TARGET ${PROJECT_NAME})
|
||||||
|
message("The ${PROJECT_NAME} arledy included in main Project")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
option(BUILD_SHARED_LIBS "Enable or disable shared libraries" OFF)
|
||||||
|
|
||||||
|
file(GLOB SOURCE_CPP
|
||||||
|
"crc/*.h"
|
||||||
|
"crc/*.cpp"
|
||||||
|
"crc/*.c"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME} ${SOURCE_CPP})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue