Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 3.2.2)
- set(LIB geometry)
- project(${LIB})
- set(MAJOR_VERSION 0.1.0)
- set(MINOR_VERSION 0.1)
- set(SOURCES ../src/point.cpp ../src/line.cpp ../src/vector.cpp ../src/polygon.cpp
- ../src/ellipse.cpp ../src/circle.cpp ../src/rectangle.cpp ../src/square.cpp
- ../src/triangle.cpp)
- set(HEADERS ../include/point.h ../include/line.h ../include/vector.h ../include/polygon.h
- ../include/ellipse.h ../include/circle.h ../include/rectangle.h ../include/square.h
- ../include/triangle.h ../include/geometry.h ../include/functions.h ../include/shape.h)
- set(LIB_INSTALL_PATH /usr/local/lib)
- set(HEADERS_INSTALL_PATH /usr/local/include/math/${LIB})
- link_directories("${LIB_INSTALL_PATH}")
- set(REQUIRED_LIBRARIES "")
- add_compile_options(-O2 -std=c++11 -g -Wall)
- add_library(${LIB} SHARED ${SOURCES})
- target_link_libraries(${LIB} ${REQUIRED_LIBRARIES} )
- set_target_properties(${LIB} PROPERTIES VERSION ${MAJOR_VERSION} SOVERSION ${MINOR_VERSION})
- install(TARGETS ${LIB} DESTINATION ${LIB_INSTALL_PATH})
- install(FILES ${HEADERS} DESTINATION ${HEADERS_INSTALL_PATH})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement