Skip to content

Commit

Permalink
[cmake] Fix project name
Browse files Browse the repository at this point in the history
  • Loading branch information
a127a127 authored and cthsieh committed Apr 22, 2020
1 parent 1752f44 commit cc65171
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@ enable_testing()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

####################
# Project
project(onnc)
set(ONNC_ROOT_PATH ${CMAKE_CURRENT_LIST_DIR})
file(READ ${ONNC_ROOT_PATH}/VERSION PACKAGE_VERSION)
string(REPLACE "\n" " " PACKAGE_VERSION ${PACKAGE_VERSION})
set(PACKAGE "onnc")
set(PACKAGE_BUGREPORT "maillist.onnc.ai")
set(PACKAGE_NAME "ONNC")
set(PACKAGE_STRING "ONNC ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "onnc")
set(PACKAGE_URL "onnc.ai")

####################
# ONNC RT
if(ONNC_RT_ONLY)
SET(ONNC_RUNTIME_LIB_NAME "onnc-rt")
set(LIB_BASE_PATH ${CMAKE_CURRENT_LIST_DIR})

project(${ONNC_RUNTIME_LIB_NAME} VERSION ${LIB_VERSION_STRING} LANGUAGES C)
cmake_policy(SET CMP0048 NEW)

#SET(ONNC_RUNTIME_LIB_NAME "onnc-rt")

add_library(${ONNC_RUNTIME_LIB_NAME}
lib/Runtime/onnc-runtime.c
)
Expand Down Expand Up @@ -97,19 +109,6 @@ if (ENABLE_WERROR)
add_compile_options(-Werror)
endif()

####################
# Project
project(onnc)
set(ONNC_ROOT_PATH ${CMAKE_CURRENT_LIST_DIR})
file(READ ${ONNC_ROOT_PATH}/VERSION PACKAGE_VERSION)
string(REPLACE "\n" " " PACKAGE_VERSION ${PACKAGE_VERSION})
set(PACKAGE "onnc")
set(PACKAGE_BUGREPORT "maillist.onnc.ai")
set(PACKAGE_NAME "ONNC")
set(PACKAGE_STRING "ONNC ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "onnc")
set(PACKAGE_URL "onnc.ai")

####################
# Check
include(check)
Expand Down

0 comments on commit cc65171

Please sign in to comment.