Re: cmake-5 branch
patrick <[email protected]>
| Newsgroups | gmane.comp.gnu.gnucap.devel |
|---|---|
| Message-ID | <CAEx2pddaMaZ=79qkAHpU7dmKMEArvVAY4Hft+91qgmD6SvJdYg@mail.gmail.com> |
Hi Felix, yes, thanks that approach will work for me too. Actually the CMakeLists for main needs an include_directory for the generated config.h header 0001-Include-generated-header.patch On Sat, Aug 22, 2020 at 5:01 PM Felix Salfelder <[email protected]> wrote: > > On Sat, Aug 22, 2020 at 11:03:00AM +0200, patrick wrote: > > I am trying out the new branch cmake-5 but get: > > Hi Patrick. > > there is a branch stale/cmake-5, but it is obsolete. the "stale" > branches mainly indicate dead ends, and show stuff that does not work > properly, for the curious. > > A cmake build system "proof of concept" is provided in gnucap-tools, > documented here [1]. It is based on cmake-3, and includes your link > patch for MINGW. > > > CMake Error at /usr/local/share/cmake-3.15/Modules/CPack.cmake:523 (message): > > CPack license resource file: > > "/home/pmu/projects/gnucap/gnucap/cmake/COPYING" could not be found. > > This file exist as a dummy [2]. It is in fact needed, because I don't > know how to set the top-level directory for cmake. > > thanks for testing > felix > > [1] http://gnucap.org/dokuwiki/doku.php/gnucap:manual:autotools > [2] http://git.savannah.gnu.org/cgit/gnucap/gnucap-tools.git/tree/?h=cmake
0001-Include-generated-header.patch
(text/x-patch, 1.2 KB)
From 46699aaef55edef7bb4e76804d8cce39a761a099 Mon Sep 17 00:00:00 2001 From: "[email protected]" <[email protected]> Date: Sat, 22 Aug 2020 17:25:52 +0200 Subject: [PATCH] Include generated header --- CMakeLists.txt | 1 + main/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b82617a..8eecc8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,7 @@ configure_file( "${PROJECT_SOURCE_DIR}/../main/config.h.in" "${PROJECT_BINARY_DIR}/main/config.h" ) +set(GENERATED_HEADER_DIR ${CMAKE_CURRENT_BINARY_DIR}) # configure RPATH set(CMAKE_MACOSX_RPATH FALSE) # don't use RPATH for MacOSX diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 5c61c14..9dbea06 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,9 +1,9 @@ set(RAW_SRCS main.cc) list(TRANSFORM RAW_SRCS PREPEND ../../main/) +include_directories(${GENERATED_HEADER_DIR}/main) add_executable(gnucap-ui ${RAW_SRCS}) set_target_properties(gnucap-ui PROPERTIES OUTPUT_NAME "gnucap") - target_link_libraries(gnucap-ui gnucap) install(TARGETS gnucap-ui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -- 2.16.4