Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required (VERSION 3.8)
- include_directories("include")
- file(GLOB_RECURSE octopus_common_sources "source/octopus/*.cpp")
- add_library (octopus ${octopus_common_sources})
- target_compile_definitions(octopus PRIVATE "OCTO_BUILD=1")
- target_compile_features(octopus PUBLIC cxx_std_17)
- get_target_property(octopus_target_type octopus TYPE)
- if (octopus_target_type STREQUAL "SHARED_LIBRARY")
- target_compile_definitions(octopus PUBLIC "OCTO_SHARED=1")
- elseif (octopus_target_type STREQUAL "STATIC_LIBRARY")
- target_compile_definitions(octopus PUBLIC "OCTO_STATIC=1")
- else ()
- message( FATAL_ERROR "Invalid target type for Octopus engine." )
- endif ()
- file(GLOB_RECURSE octopus_test_sources "source/octopus-test/*.cpp")
- add_executable (octopus_test ${octopus_test_sources})
- target_link_libraries (octopus_test octopus)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement