CMakeLists.txt

changeset 201
1bfa1cdffb02
parent 185
e83ec58cc458
equal deleted inserted replaced
200:3fb775db4829 201:1bfa1cdffb02
1 cmake_minimum_required (VERSION 2.4) 1 cmake_minimum_required (VERSION 3.2)
2 cmake_policy (SET CMP0003 NEW) 2 cmake_policy (SET CMP0003 NEW)
3 project (ZFC9000) 3 project (ZFC9000)
4 string (TOLOWER ${CMAKE_PROJECT_NAME} TARGET_NAME) 4 string (TOLOWER ${CMAKE_PROJECT_NAME} TARGET_NAME)
5 set(CMAKE_CXX_STANDARD 17) 5 set(CMAKE_CXX_STANDARD 17)
6 set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 set(CMAKE_CXX_STANDARD_REQUIRED ON)
7 set(CMAKE_CXX_EXTENSIONS OFF) 7 set(CMAKE_CXX_EXTENSIONS OFF)
8 add_definitions(-DCMAKE_PROJECT_NAME="${CMAKE_PROJECT_NAME}")
8 9
9 add_library (huffman STATIC 10 add_library (huffman STATIC
10 huffman/bitreader.cpp 11 huffman/bitreader.cpp
11 huffman/bitwriter.cpp 12 huffman/bitwriter.cpp
12 huffman/huffcodec.cpp 13 huffman/huffcodec.cpp
137 target_link_libraries (${TARGET_NAME} ${CURSES_LIBRARIES}) 138 target_link_libraries (${TARGET_NAME} ${CURSES_LIBRARIES})
138 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -std=c++0x") 139 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -std=c++0x")
139 endif() 140 endif()
140 141
141 add_custom_target (make_hginfo_h 142 add_custom_target (make_hginfo_h
142 COMMAND python 143 COMMAND python3
143 "${CMAKE_SOURCE_DIR}/updaterevision/updaterevision.py" 144 "${CMAKE_SOURCE_DIR}/updaterevision/updaterevision.py"
144 "${CMAKE_CURRENT_BINARY_DIR}/hginfo.h") 145 "${CMAKE_CURRENT_BINARY_DIR}/hginfo.h")
145 add_dependencies (${TARGET_NAME} make_hginfo_h) 146 add_dependencies (${TARGET_NAME} make_hginfo_h)

mercurial