Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required (VERSION 2.6)
- project (Relocate)
- message("Using CMake version ${CMAKE_VERSION}")
- message("Processing CMakeLists.txt")
- # Version number
- set (Relocate_VERSION_MAJOR 1)
- set (Relocate_VERSION_MINOR 0)
- # configure a header file to pass some of the CMake settings
- # to the source code
- configure_file (
- "${PROJECT_SOURCE_DIR}/Config.h.in"
- "${PROJECT_BINARY_DIR}/Config.h"
- )
- # add the binary tree to the search path for include files
- # so that we will find Config.h
- include_directories("${PROJECT_BINARY_DIR}")
- # Define sources and executable
- set(EXECUTABLE_NAME "Relocate")
- add_executable(${EXECUTABLE_NAME} main.cpp)
- # Detect and add SFML
- set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
- #Find any version 2.X of SFML
- #See the FindSFML.cmake file for additional details and instructions
- find_package(SFML 2 REQUIRED network audio graphics window system)
- if(SFML_FOUND)
- include_directories(${SFML_INCLUDE_DIR})
- target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
- endif()
- # Install target
- install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin)
- # CPack packaging
- include(InstallRequiredSystemLibraries)
- set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
- set(CPACK_PACKAGE_VERSION_MAJOR "${myproject_VERSION_MAJOR}")
- set(CPACK_PACKAGE_VERSION_MINOR "${myproject_VERSION_MINOR}")
- include(CPack)
- ashe@ArchTitan ~/Documents/relocate master make
- [ 50%] Linking CXX executable Relocate
- CMakeFiles/Relocate.dir/main.cpp.o: In function `main':
- main.cpp:(.text+0x90): undefined reference to `sf::String::String(char const*, std::locale const&)'
- main.cpp:(.text+0xae): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
- main.cpp:(.text+0xe1): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings con
- st&)'
- main.cpp:(.text+0x11b): undefined reference to `sf::CircleShape::CircleShape(float, unsigned long)'
- main.cpp:(.text+0x129): undefined reference to `sf::Color::Green'
- main.cpp:(.text+0x131): undefined reference to `sf::Shape::setFillColor(sf::Color const&)'
- main.cpp:(.text+0x140): undefined reference to `sf::Window::isOpen() const'
- main.cpp:(.text+0x161): undefined reference to `sf::Window::pollEvent(sf::Event&)'
- main.cpp:(.text+0x17e): undefined reference to `sf::Window::close()'
- main.cpp:(.text+0x1a4): undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
- main.cpp:(.text+0x1c1): undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
- main.cpp:(.text+0x1da): undefined reference to `sf::RenderStates::Default'
- main.cpp:(.text+0x1e5): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
- main.cpp:(.text+0x1f4): undefined reference to `sf::Window::display()'
- main.cpp:(.text+0x21c): undefined reference to `sf::RenderWindow::~RenderWindow()'
- main.cpp:(.text+0x286): undefined reference to `sf::RenderWindow::~RenderWindow()'
- CMakeFiles/Relocate.dir/main.cpp.o: In function `sf::CircleShape::~CircleShape()':
- main.cpp:(.text._ZN2sf11CircleShapeD2Ev[_ZN2sf11CircleShapeD5Ev]+0xf): undefined reference to `vtable for sf::CircleShape'
- main.cpp:(.text._ZN2sf11CircleShapeD2Ev[_ZN2sf11CircleShapeD5Ev]+0x1d): undefined reference to `vtable for sf::CircleShape'
- main.cpp:(.text._ZN2sf11CircleShapeD2Ev[_ZN2sf11CircleShapeD5Ev]+0x31): undefined reference to `sf::Shape::~Shape()'
- collect2: error: ld returned 1 exit status
- make[2]: *** [CMakeFiles/Relocate.dir/build.make:84: Relocate] Error 1
- make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/Relocate.dir/all] Error 2
- make: *** [Makefile:152: all] Error 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement