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

nanodbc: missing CMake .config files #748

Closed
mloskot opened this issue Mar 8, 2017 · 2 comments
Closed

nanodbc: missing CMake .config files #748

mloskot opened this issue Mar 8, 2017 · 2 comments
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@mloskot
Copy link
Contributor

mloskot commented Mar 8, 2017

  • Install
λ vcpkg install nanodbc
-- CURRENT_INSTALLED_DIR=F:/dev/vcpkg/installed/x86-windows
-- DOWNLOADS=F:/dev/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=F:/dev/vcpkg/packages/nanodbc_x86-windows
-- CURRENT_BUILDTREES_DIR=F:/dev/vcpkg/buildtrees/nanodbc
-- CURRENT_PORT_DIR=F:/dev/vcpkg/ports/nanodbc/.
-- Downloading https://github.com/lexicalunit/nanodbc/archive/v2.12.4.tar.gz...
-- Downloading https://github.com/lexicalunit/nanodbc/archive/v2.12.4.tar.gz... OK
-- Testing integrity of downloaded file...
-- Testing integrity of downloaded file... OK
-- Extracting source F:/dev/vcpkg/downloads/nanodbc-2.12.4.tar.gz
-- Extracting done
-- Applying patch F:/dev/vcpkg/ports/nanodbc/0001_cmake.patch
-- Applying patch F:/dev/vcpkg/ports/nanodbc/0001_cmake.patch done
-- Applying patch F:/dev/vcpkg/ports/nanodbc/0002_msvc14_codecvt.patch
-- Applying patch F:/dev/vcpkg/ports/nanodbc/0002_msvc14_codecvt.patch done
-- Applying patch F:/dev/vcpkg/ports/nanodbc/0003_export_def.patch
-- Applying patch F:/dev/vcpkg/ports/nanodbc/0003_export_def.patch done
-- Applying patch F:/dev/vcpkg/ports/nanodbc/0004_unicode.patch
-- Applying patch F:/dev/vcpkg/ports/nanodbc/0004_unicode.patch done
-- Configuring x86-windows-rel
-- Configuring x86-windows-rel done
-- Configuring x86-windows-dbg
-- Configuring x86-windows-dbg done
-- Package x86-windows-rel
-- Package x86-windows-rel done
-- Package x86-windows-dbg
-- Package x86-windows-dbg done
-- Performing post-build validation
-- Performing post-build validation done
Package nanodbc:x86-windows is installed
  • Check
λ vcpkg list nanodbc
nanodbc:x86-windows         2.12.4           A small C++ wrapper for the native C ODBC API.
  • Create simple test
λ cd F:\dev\test
λ cat test.cpp
#include <nanodbc.h>
int main() {}
D:\dev\test
λ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.8)
project(test)
find_package(nanodbc REQUIRED)
link_libraries(nanodbc)
add_executable(test test.cpp) 
  • Build test
λ mkdir build
λ cd build
λ  "C:\Program Files\CMake\bin\cmake.exe" --version
cmake version 3.8.0-rc2
λ "C:\Program Files\CMake\bin\cmake.exe" .. -DCMAKE_TOOLCHAIN_FILE=F:\dev\vcpkg\scripts\buildsystems\vcpkg.cmake
-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.10.25017.0
-- The CXX compiler identification is MSVC 19.10.25017.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (find_package):
  By not providing "Findnanodbc.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "nanodbc", but
  CMake did not find one.

  Could not find a package configuration file provided by "nanodbc" with any
  of the following names:

    nanodbcConfig.cmake
    nanodbc-config.cmake

  Add the installation prefix of "nanodbc" to CMAKE_PREFIX_PATH or set
  "nanodbc_DIR" to a directory containing one of the above files.  If
  "nanodbc" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "F:/dev/test/build/CMakeFiles/CMakeOutput.log".
  • Conclusion

Currently, the package seems missing some CMake configuration, is incomplete.

Who is responsible for providing nanodbcConfig.cmake or nanodbc-config.cmake for vcpkg?

@ras0219-msft
Copy link
Contributor

We want to represent libraries as closely as we can to what's present on other platforms. This means we rely on upstream providing a CMakeLists.txt which exports nanodbc-config.cmake, so I believe the issue you've created over at https://github.com/lexicalunit/nanodbc/issues/243 is the right path to fix this.

@ras0219-msft ras0219-msft added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Mar 10, 2017
@mloskot
Copy link
Contributor Author

mloskot commented Mar 21, 2017

FYI, nanodbc has been updated and now generates nanodbc-config.cmake (lexicalunit/nanodbc#245)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

No branches or pull requests

2 participants