SHARE
TWEET

Untitled

tinyevil Jan 29th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required (VERSION 3.8)
  2.  
  3. include_directories("include")
  4. file(GLOB_RECURSE octopus_common_sources "source/octopus/*.cpp")
  5.  
  6. add_library (octopus ${octopus_common_sources})
  7. target_compile_definitions(octopus PRIVATE "OCTO_BUILD=1")
  8. target_compile_features(octopus PUBLIC cxx_std_17)
  9.  
  10. get_target_property(octopus_target_type octopus TYPE)
  11. if (octopus_target_type STREQUAL "SHARED_LIBRARY")
  12.     target_compile_definitions(octopus PUBLIC "OCTO_SHARED=1")
  13. elseif (octopus_target_type STREQUAL "STATIC_LIBRARY")
  14.     target_compile_definitions(octopus PUBLIC "OCTO_STATIC=1")
  15. else ()
  16.     message( FATAL_ERROR "Invalid target type for Octopus engine." )
  17. endif ()
  18.  
  19. file(GLOB_RECURSE octopus_test_sources "source/octopus-test/*.cpp")
  20.  
  21.  
  22. add_executable (octopus_test ${octopus_test_sources})
  23. target_link_libraries (octopus_test octopus)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top