forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
24 lines (21 loc) · 1023 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cmake_minimum_required(VERSION 3.1)
project(test_package LANGUAGES CXX)
find_package(Ruby REQUIRED)
add_executable(${PROJECT_NAME} test_package.cpp)
set_target_properties(${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
target_link_libraries(${PROJECT_NAME} Ruby::Ruby)
if (RUBY_STATIC_RUBY)
target_compile_definitions(${PROJECT_NAME} PRIVATE RUBY_STATIC_RUBY)
endif()
if (RUBY_STATIC_LINKED_EXT)
target_compile_definitions(${PROJECT_NAME} PRIVATE RUBY_STATIC_LINKED_EXT)
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/bin)
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/bin)
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/bin)
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/bin)