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

CMake variables CLANDMARK_INCLUDE_DIRS and CLANDMARK_LIBRARIES not set #32

Open
mrjogo opened this issue Dec 22, 2015 · 5 comments
Open
Assignees

Comments

@mrjogo
Copy link

mrjogo commented Dec 22, 2015

I've installed CLandmark to my system (OS X 10.11.1; make install), but when I try to use the library with my CMake file, it fails because find_package(clandmark REQUIRED) doesn't set CLANDMARK_INCLUDE_DIRS or CLANDMARK_LIBRARIES (I based my CMake on the example from http://cmp.felk.cvut.cz/~uricamic/clandmark/#snippets_cmake_example, so I expect that won't work either).

@uricamic
Copy link
Owner

Hi @mrjogo,

just to avoid possible confusion, was the library successfully compiled?

@mrjogo
Copy link
Author

mrjogo commented Dec 23, 2015

Yes, using default CMake options.

I could be missing a step to set up CMake after installing CLandmark using make install. Using this trivial CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
project(test_clandmark)

find_package(clandmark REQUIRED)

MESSAGE(STATUS "CLANDMARK_INCLUDE_DIRS: " ${CLANDMARK_INCLUDE_DIRS})
MESSAGE(STATUS "CLANDMARK_LIBRARIES: " ${CLANDMARK_LIBRARIES})

Creates the following output (you can see the variables aren't set):

$ cmake ..
-- The C compiler identification is AppleClang 5.1.0.5030040
-- The CXX compiler identification is AppleClang 5.1.0.5030040
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CLANDMARK_INCLUDE_DIRS: 
-- CLANDMARK_LIBRARIES: 
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ruddick/Desktop/test_clandmark/build

Thanks!

@uricamic
Copy link
Owner

And do you see clandmark_DIR and flandmark_DIR variables in CMake?

If anything fails, you can specify the include directories and libraries manually by adding the libclandmark/ folder to the includes and both clandmark and flandmark dynamic libraries...

@mrjogo
Copy link
Author

mrjogo commented Dec 25, 2015

I output all the CMake variables from the above CMakeLists.txt, and here were the clandmark ones:

-- clandmark_CONFIG=/usr/local/lib/cmake/clandmark/clandmarkConfig.cmake
-- clandmark_CONSIDERED_CONFIGS=/usr/local/lib/cmake/clandmark/clandmarkConfig.cmake
-- clandmark_CONSIDERED_VERSIONS=1.5
-- clandmark_DIR=/usr/local/lib/cmake/clandmark
-- clandmark_FOUND=1
-- clandmark_VERSION=1.5
-- clandmark_VERSION_COUNT=2
-- clandmark_VERSION_MAJOR=1
-- clandmark_VERSION_MINOR=5
-- clandmark_VERSION_PATCH=0
-- clandmark_VERSION_TWEAK=0

Interestingly, when I add find_package(flandmark REQUIRED), I get the following error, despite flandmark also having been installed:

CMake Error at CMakeLists.txt:5 (find_package):
  By not providing "Findflandmark.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "flandmark", but CMake did not find one.

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

    flandmarkConfig.cmake
    flandmark-config.cmake

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

I can certainly work around this, but it seems that something's going wrong with the install (I'm afraid I'm not familiar enough with CMake or your library to diagnose what).

@uricamic
Copy link
Owner

Ok, thanks for the error messages, I will try to fix this.

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