|
1 | 1 | cmake_minimum_required(VERSION 3.0)
|
2 | 2 |
|
3 | 3 | project(jsgfkitxx
|
4 |
| - VERSION 1.0 |
5 |
| - LANGUAGES CXX) |
| 4 | + VERSION 1.1 |
| 5 | + LANGUAGES CXX |
| 6 | +) |
| 7 | + |
| 8 | +set(JSGF_KIT_XX_SOURCES |
| 9 | + src/grammar.cpp |
| 10 | + src/expansion.cpp |
| 11 | + src/rule.cpp |
| 12 | + src/matchinfo.cpp |
| 13 | + src/matchresult.cpp |
| 14 | + src/tag.cpp |
| 15 | + src/unparsedsection.cpp |
| 16 | + src/kleenestar.cpp |
| 17 | + src/plusoperator.cpp |
| 18 | + src/optionalgrouping.cpp |
| 19 | + src/requiredgrouping.cpp |
| 20 | + src/sequence.cpp |
| 21 | + src/alternativeset.cpp |
| 22 | + src/token.cpp |
| 23 | + src/rulereference.cpp |
| 24 | +) |
| 25 | + |
| 26 | +add_library(jsgfkitxx STATIC ${JSGF_KIT_XX_SOURCES}) |
| 27 | +target_include_directories(jsgfkitxx PUBLIC ${PROJECT_SOURCE_DIR}/include) |
6 | 28 |
|
7 | 29 | include(GNUInstallDirs)
|
8 | 30 |
|
9 |
| -option(ENABLE_DEBUG "Enables debugging messages" OFF) |
10 |
| - |
11 |
| -set(KIT_SOURCES src/grammar.cpp src/expansion.cpp src/rule.cpp src/matchinfo.cpp src/matchresult.cpp src/tag.cpp |
12 |
| - src/unparsedsection.cpp src/kleenestar.cpp src/plusoperator.cpp |
13 |
| - src/optionalgrouping.cpp src/requiredgrouping.cpp src/sequence.cpp |
14 |
| - src/alternativeset.cpp src/token.cpp src/rulereference.cpp) |
15 |
| - |
16 |
| -set(KIT_HEADERS include/rule.h include/expansion.h include/grammar.h |
17 |
| - include/unparsedsection.h include/kleenestar.h |
18 |
| - include/alternativeset.h include/token.h include/tag.h include/matchinfo.h |
19 |
| - include/matchresult.h include/sequence.h include/plusoperator.h include/requiredgrouping.h |
20 |
| - include/optionalgrouping.h include/rulereference.h) |
21 |
| - |
22 |
| -add_library(jsgfkit STATIC ${KIT_SOURCES}) |
23 |
| -target_include_directories(jsgfkit PUBLIC ${PROJECT_BINARY_DIR}/include) |
24 |
| - |
25 | 31 | #Set variables for the .pc file
|
26 | 32 | set(prefix "${CMAKE_INSTALL_PREFIX}")
|
27 | 33 | set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
|
28 | 34 | set(libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
29 | 35 | set(includedir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
|
30 |
| -configure_file(jsgfkit.pc.in jsgfkit.pc @ONLY) |
| 36 | +configure_file(jsgfkitxx.pc.in jsgfkitxx.pc @ONLY) |
31 | 37 |
|
32 |
| -install(TARGETS jsgfkit |
33 |
| - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
| 38 | +install(TARGETS jsgfkitxx |
| 39 | + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 40 | +) |
34 | 41 |
|
35 |
| -install(FILES ${KIT_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jsgfkit) |
| 42 | +install(FILES ${KIT_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jsgfkitxx) |
36 | 43 |
|
37 |
| -install(FILES jsgfkit.pc DESTINATION ${CMAKE_INSTALL_DATAROOT_DIR}/pkgconfig) |
| 44 | +install(FILES jsgfkitxx.pc DESTINATION ${CMAKE_INSTALL_DATAROOT_DIR}/pkgconfig) |
38 | 45 |
|
39 | 46 | # Build Tests
|
40 | 47 | enable_testing ()
|
|
0 commit comments