I'm trying to build an application using CMake. The library I'm trying to use is SFML. Ubuntu is my operating system of choice.
This is my CMakeLists.txt ("//" comments not part of actual file):
project(MyApp) // App name
cmake_minimum_required(VERSION 2.8) // CMake version
aux_source_directory(. SRC_LIST) // Source files
add_executable(${PROJECT_NAME} ${SRC_LIST}) // Executable
target_compile_features(${PROJECT_NAME} PRIVATE cxx_range_for) // C++ version taken care of
set(CMAKE_MODULE_PATH "/usr/local/share/SFML/cmake/Modules" ${CMAKE_MODULE_PATH}) // Path to my "FindSML.cmake" file
find_package(SFML 2 REQUIRED system window graphics network audio) // Finding SFML 2.X
#LINKING
target_link_libraries(${PROJECT_NAME} // Linking libraries
${SFML_LIBRARIES} ) // Linking SFML
These are the errors I get:
error: SerIDE: hidden symbol `__cpu_model' in /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a(cpuinfo.o) is referenced by DSO
error: final link failed: Bad value
error: collect2: error: ld returned 1 exit status