You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. PROJECT(mensia-advanced-visualization)
  2. MESSAGE(STATUS "Now building ${PROJECT_NAME} ${PROJECT_VERSION} (${OV_PROJECT_BRANCH}~${OV_PROJECT_COMMITHASH})" )
  3. INCLUDE_DIRECTORIES("include/mensia/")
  4. INCLUDE_DIRECTORIES("include/mensia/advanced-visualization")
  5. FILE(GLOB_RECURSE SRC_FILES src/*.cpp src/*.hpp include/*.hpp)
  6. INCLUDE("FindSourceRCProperties")
  7. ADD_LIBRARY(${PROJECT_NAME}-static STATIC ${SRC_FILES})
  8. ADD_LIBRARY(${PROJECT_NAME} SHARED EXCLUDE_FROM_ALL ${SRC_FILES})
  9. IF(UNIX)
  10. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES COMPILE_FLAGS "-fPIC")
  11. ENDIF(UNIX)
  12. SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
  13. VERSION ${PROJECT_VERSION}
  14. SOVERSION ${PROJECT_VERSION_MAJOR}
  15. COMPILE_FLAGS "-DLMAV_Exports -DLMAV_Shared")
  16. ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # Definition for constant math as M_PI
  17. INCLUDE("FindThirdPartyOpenGL")
  18. INCLUDE("FindThirdPartyEigen")
  19. # ---------------------------------
  20. # Target macros
  21. # Defines target operating system, architecture and compiler
  22. # ---------------------------------
  23. SET_BUILD_PLATFORM()
  24. # -----------------------------
  25. # Install files
  26. # -----------------------------
  27. #INSTALL(TARGETS ${PROJECT_NAME}
  28. # RUNTIME DESTINATION ${DIST_BINDIR}
  29. # LIBRARY DESTINATION ${DIST_LIBDIR}
  30. # ARCHIVE DESTINATION ${DIST_LIBDIR})
  31. INSTALL(TARGETS ${PROJECT_NAME}-static
  32. RUNTIME DESTINATION ${DIST_BINDIR}
  33. LIBRARY DESTINATION ${DIST_LIBDIR}
  34. ARCHIVE DESTINATION ${DIST_LIBDIR})
  35. INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.hpp")
  36. ADD_SUBDIRECTORY(test)