Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.h.cmake is missing from .tar.gz archive #108

Open
simonbyrne opened this issue Jan 12, 2022 · 6 comments
Open

config.h.cmake is missing from .tar.gz archive #108

simonbyrne opened this issue Jan 12, 2022 · 6 comments

Comments

@simonbyrne
Copy link

Attempting to build with cmake using the .tar.gz archive (https://artifacts.unidata.ucar.edu/repository/downloads-udunits/udunits-2.2.28.tar.gz) results in the following error:

CMake Error: File /Users/simon/src/udunits-2.2.28/config.h.cmake does not exist.
CMake Error at CMakeLists.txt:206 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file

The file does appear in the .zip archive however (https://artifacts.unidata.ucar.edu/repository/downloads-udunits/udunits-2.2.28.zip)

@semmerson
Copy link
Collaborator

Odd. The file "config.h.cmake" doesn't exist. The file "config-cmake.h" does, however, and should be in the distribution. Is it?

@simonbyrne
Copy link
Author

No, I don't see that either.

@semmerson
Copy link
Collaborator

@simonbyrne What's the "CONFIGURE_FILE" directive in your "CMakeLists.txt" file?

@simonbyrne
Copy link
Author

It's the same as in the repository:

UDUNITS-2/CMakeLists.txt

Lines 206 to 208 in c83da98

CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/config.h.cmake"
"${PROJECT_BINARY_DIR}/config.h")

@semmerson
Copy link
Collaborator

@simonbyrne Looks like I mistakenly left it out of the distribution (I'm still getting used to CMake). Here's what it should contain

/*
 * C macros set by cmake(1)
 */
#define DEFAULT_UDUNITS2_XML_PATH "@DEFAULT_UDUNITS2_XML_PATH@"
#cmakedefine DLL_UDUNITS2
#cmakedefine DLL_EXPORT
#cmakedefine HAVE_UNISTD_H 
#cmakedefine YY_NO_UNISTD_H

Try this and let me know.

@simonbyrne
Copy link
Author

Thanks, I ended up using the .zip archive, which the necessary files, see JuliaPackaging/Yggdrasil#4232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants