1
General / Re: Linking with CMake
« on: December 01, 2016, 02:03:50 pm »
Oh shit! Right! I forgot about system module! Thanks sir! Now everything is fine.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
cmake_minimum_required(VERSION 3.4)
project(Program)
set(SOURCE_FILES
src/main.cpp
)
set(SFML_ROOT "C:/Users/Komputer.DESKTOP-5G9R8AU/Desktop/SFML_ROOT/install")
set(SFML_INCLUDE_DIR "C:/Users/Komputer.DESKTOP-5G9R8AU/Desktop/SFML_ROOT/install/include")
set(SFML_LIBRARY_DIR "C:/Users/Komputer.DESKTOP-5G9R8AU/Desktop/SFML_ROOT/install/lib")
set(CMAKE_MODULE_PATH "C:/Users/Komputer.DESKTOP-5G9R8AU/Desktop/SFML_ROOT/install/cmake/Modules")
find_package(SFML 2 REQUIRED window)
include_directories(
${SFML_INCLUDE_DIR}
)
add_executable(Program ${SOURCE_FILES}
)
message ( ${SFML_LIBRARIES} )
target_link_libraries(Program ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
cmake_minimum_required(VERSION 3.4)
project(Program)
set(SOURCE_FILES
src/main.cpp
)
set(SFML_ROOT "${CMAKE_SOURCE_DIR}/SFML/lib")
set(SFML_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/SFML/include")
set(SFML_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/SFML/lib")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/SFML/cmake/Modules")
find_package(SFML 2 REQUIRED window )
include_directories(
${SFML_INCLUDE_DIR}
)
add_executable(Program ${SOURCE_FILES}
${SFML_LIBRARIES}
)
message ( ${SFML_LIBRARIES} )
target_link_libraries(Program ${SFML_LIBRARIES})