mirror of
https://github.com/Andreabont/OpenMandelbrot.git
synced 2024-11-22 15:37:57 +00:00
Fix cmake
This commit is contained in:
parent
a93410a321
commit
2fd5cb5d36
@ -1,19 +1,26 @@
|
|||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(mandelbrot)
|
project(mandelbrot)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -ffast-math -fopenmp")
|
|
||||||
set(EXECUTABLE_NAME "mandelbrot")
|
set(EXECUTABLE_NAME "mandelbrot")
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
endif(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -fopenmp")
|
||||||
|
|
||||||
add_executable(${EXECUTABLE_NAME} main.cpp functions.hpp Fractal.hpp Fractal.cpp)
|
add_executable(${EXECUTABLE_NAME} main.cpp functions.hpp Fractal.hpp Fractal.cpp)
|
||||||
|
|
||||||
link_directories(/usr/local/lib)
|
#Find Boost
|
||||||
|
|
||||||
set(BOOST_LIBS program_options)
|
set(BOOST_LIBS program_options)
|
||||||
find_package(Boost COMPONENTS ${BOOST_LIBS} REQUIRED)
|
find_package(Boost COMPONENTS ${BOOST_LIBS} REQUIRED)
|
||||||
|
|
||||||
target_link_libraries (${EXECUTABLE_NAME} ${Boost_LIBRARIES})
|
target_link_libraries (${EXECUTABLE_NAME} ${Boost_LIBRARIES})
|
||||||
target_link_libraries (${EXECUTABLE_NAME} sfml-window)
|
|
||||||
target_link_libraries (${EXECUTABLE_NAME} sfml-system)
|
# Find SFML
|
||||||
target_link_libraries (${EXECUTABLE_NAME} sfml-graphics)
|
set(SFML_LIBS sfml-window sfml-system sfml-graphics)
|
||||||
|
target_link_libraries (${EXECUTABLE_NAME} ${SFML_LIBS})
|
||||||
|
|
||||||
install(TARGETS ${EXECUTABLE_NAME} RUNTIME DESTINATION bin)
|
install(TARGETS ${EXECUTABLE_NAME} RUNTIME DESTINATION bin)
|
||||||
|
Loading…
Reference in New Issue
Block a user