Skip to content

Instantly share code, notes, and snippets.

@Keloran
Last active August 29, 2015 14:05
Show Gist options
  • Save Keloran/2cbbdc546e38589a143f to your computer and use it in GitHub Desktop.
Save Keloran/2cbbdc546e38589a143f to your computer and use it in GitHub Desktop.
Cant find module
# CMake Version
cmake_minimum_required(VERSION 2.8)
# Project Name
project(Markov)
# Module Finder Path
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/../../../../CMakeModules/")
message(STATUS ${CMAKE_MODULE_PATH})
# Source
set(Lib_Headers ${PROJECT_SOURCE_DIR}/Markov.hpp)
set(Lib_Source ${PROJECT_SOURCE_DIR}/Markov.cpp)
# NordicOS
find_package(NordicOS REQUIRED)
include_directories(${NORDICOS_INCLUDE_DIR})
link_directories(${NORDICOS_LIBRARY_DIR})
add_definitions(${NORDICOS_DEFINITIONS})
# Generate Library
add_library(Markov STATIC ${Lib_Source} ${Lib_Headers})
set_target_properties(Markov PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(Markov PROPERTIES OUTPUT_NAME "Markov")
# Linker
if (WIN32)
target_link_libraries(Markov ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} winmm gdi32 boost_locale c++abi)
elseif (APPLE)
target_link_libraries(Markov "-framework Foundation -framework AppKit -framework IOKit -framework Carbon -framework OpenGL -framework CoreFoundation -framework OpenAL -framework GameKit -framework GLKit" boost_locale c++abi)
elseif (UNIX)
target_link_libraries(Markov ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${X11_X11_LIB} ${X11_Xrandr_LIB} boost_locale c++abi)
endif()
# Link libraries
target_link_libraries(Markov NordicOS)
develbox:Markov Keloran$ cmake .
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- /Users/Keloran/Documents/NordicArts/RandGame/Game/Game/Libs/Markov/../../../../CMakeModules/
CMake Error at CMakeLists.txt:21 (find_package):
By not providing "FindNordicOS.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "NordicOS",
but CMake did not find one.
Could not find a package configuration file provided by "NordicOS" with any
of the following names:
NordicOSConfig.cmake
nordicos-config.cmake
Add the installation prefix of "NordicOS" to CMAKE_PREFIX_PATH or set
"NordicOS_DIR" to a directory containing one of the above files. If
"NordicOS" provides a separate development package or SDK, be sure it has
been installed.
develbox:Markov Keloran$ ls /Users/Keloran/Documents/NordicArts/RandGame/Game/Game/Libs/Markov/../../../../CMakeModules/
FindGLM.cmake FindNordicOS.cmake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment