Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Messages - Philosoph228

Pages: [1]
1
General / Static linking with CMake on Windows
« on: July 10, 2017, 08:09:53 pm »
Hi, I want to use dependent libraries like freetype or jpeg, which are already supplied in lib directory. How can I do it correctly with FindSFML.cmake?

My current CMakeLists.txt is:
cmake_minimum_required(VERSION 2.6)

add_executable(main main.cpp)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})

set(SFML_STATIC_LIBRARIES TRUE)
find_package(SFML 2 COMPONENTS system graphics window)
if(SFML_FOUND)
  include_directories(${SFML_INCLUDE_DIR})
  target_link_libraries(main winmm opengl32 freetype jpeg gdi32 ${SFML_LIBRARIES})
endif()
(click to show/hide)

Pages: [1]
anything