File tree Expand file tree Collapse file tree 4 files changed +23
-23
lines changed Expand file tree Collapse file tree 4 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 6060 uname -m
6161 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 10
6262 - name : configure
63- run : cmake -S . --preset=ninja-gcc -B build -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14
63+ run : cmake -S . --preset=ninja-gcc -B build
6464 - name : build debug
6565 run : cmake --build build --config=Debug -- -v
6666 - name : build release
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ set(CMAKE_CXX_EXTENSIONS OFF)
66set (CMAKE_DEBUG_POSTFIX "-d" )
77
88include (version .cmake)
9+ set (package_name djson)
910
10- project (djson VERSION ${djson_version} )
11+ project (${package_name} VERSION ${djson_version} )
1112
1213option (DJ_INSTALL "Setup djson install" ${PROJECT_IS_TOP_LEVEL} )
1314option (DJ_BUILD_TESTS "Build djson tests" ${PROJECT_IS_TOP_LEVEL} )
@@ -16,6 +17,26 @@ configure_file(Doxyfile.in Doxyfile @ONLY)
1617
1718add_subdirectory (lib)
1819
20+ if (DJ_INSTALL)
21+ message (STATUS "[${package_name} ] setting up install" )
22+ include (GNUInstallDirs)
23+
24+ set (install_dst "${CMAKE_INSTALL_LIBDIR} /cmake/${package_name} " )
25+
26+ install (
27+ TARGETS ${package_name}
28+ EXPORT ${package_name} -targets
29+ FILE_SET HEADERS
30+ )
31+
32+ install (
33+ EXPORT ${package_name} -targets
34+ DESTINATION "${install_dst} "
35+ NAMESPACE ${package_name} ::
36+ FILE ${package_name} -config.cmake
37+ )
38+ endif ()
39+
1940if (DJ_BUILD_TESTS)
2041 enable_testing ()
2142 add_subdirectory (tests)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -29,21 +29,3 @@ target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_23)
2929target_link_libraries (${PROJECT_NAME} PRIVATE
3030 $<$<BOOL :${MINGW} >:stdc++exp>
3131)
32-
33- if (DJ_INSTALL)
34- message (STATUS "[djson] setting up install" )
35- include (GNUInstallDirs)
36-
37- install (
38- TARGETS djson
39- EXPORT djson-targets
40- FILE_SET HEADERS
41- )
42-
43- install (
44- EXPORT djson-targets
45- DESTINATION "${CMAKE_INSTALL_LIBDIR} /cmake/djson"
46- NAMESPACE djson::
47- FILE djson-config.cmake
48- )
49- endif ()
You can’t perform that action at this time.
0 commit comments