Skip to content

Commit

Permalink
cmake refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed Sep 23, 2024
1 parent 49eb312 commit cea402d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions transpiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,28 @@ if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
endif()

cm_workspace(crypto3)
cm_project(transpiler WORKSPACE_NAME ${CMAKE_WORKSPACE_NAME} LANGUAGES ASM C CXX)
cm_project(transpiler WORKSPACE_NAME crypto3 LANGUAGES ASM C CXX)

cm_setup_version(VERSION 0.1.0 PREFIX ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME})
cm_setup_version(VERSION 0.1.0 PREFIX crypto3_transpiler)

find_package(crypto3 REQUIRED)

add_library(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} INTERFACE)
add_library(crypto3_transpiler INTERFACE)

set_target_properties(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} PROPERTIES
EXPORT_NAME ${CURRENT_PROJECT_NAME})


target_include_directories(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} INTERFACE
target_include_directories(crypto3_transpiler INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>"

${Boost_INCLUDE_DIRS})

target_link_libraries(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} INTERFACE
target_link_libraries(crypto3_transpiler INTERFACE
crypto3::all
${Boost_LIBRARIES})

include(CMDeploy)
cm_deploy(TARGETS ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME}
INCLUDE include
Expand Down

0 comments on commit cea402d

Please sign in to comment.