Skip to content

Commit

Permalink
Shareed Lib Support
Browse files Browse the repository at this point in the history
+ BUILD_SHARED_LIBS default OFF
+ Prefer using VERSION on project seeting to seetin _VERSION_MAJOR/MINOR explicitly
+ Check for existing Vendor ID, Device Type, Device Name, Product Code
  • Loading branch information
Bill McCormick committed Mar 23, 2019
1 parent 3b62cc2 commit 2952295
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/posix/setup_posix.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cmake -DOpENer_PLATFORM:STRING="POSIX" -DCMAKE_BUILD_TYPE:STRING="" -DBUILD_SHARED_LIBS:BOOL=ON ../../source
cmake -DOpENer_PLATFORM:STRING="POSIX" -DCMAKE_BUILD_TYPE:STRING="" -DBUILD_SHARED_LIBS:BOOL=OFF ../../source

17 changes: 9 additions & 8 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ cmake_minimum_required( VERSION 3.3 )
#######################################
# Project name #
#######################################
project( OpENer C )
project( OpENer LANGUAGES C VERSION 2.3 )

#######################################
# Project version #
#######################################
if( DEFINED OpENer_Device_Config_Vendor_Id )
message("!!!! OpENer_Device_Config_Vendor_Id IS DEFINED !!!!:" ${OpENer_Device_Config_Vendor_Id})
else()

if( NOT DEFINED OpENer_Device_Config_Vendor_Id )
set( OpENer_Device_Config_Vendor_Id 1 CACHE STRING "Device Vendor ID" )
endif()
if( NOT DEFINED OpENer_Device_Config_Device_Type )
set( OpENer_Device_Config_Device_Type 12 CACHE STRING "Device Type ID" )
endif()
if( NOT DEFINED OpENer_Device_Config_Product_Code )
set( OpENer_Device_Config_Product_Code 65001 CACHE STRING "Device Product Code" )
endif()
if( NOT DEFINED OpENer_Device_Config_Device_Name )
set( OpENer_Device_Config_Device_Name "OpENer PC" CACHE STRING "Device Name" )
set( OpENer_VERSION_MAJOR 2 CACHE STRING "Major Version" )
set( OpENer_VERSION_MINOR 3 CACHE STRING "Minor Version" )
endif()

message("!!!! OpENer_VERSION_MAJOR:" ${OpENer_VERSION_MAJOR})

configure_file(
"${PROJECT_SOURCE_DIR}/src/ports/devicedata.h.in"
"${PROJECT_BINARY_DIR}/src/ports/devicedata.h"
Expand Down

0 comments on commit 2952295

Please sign in to comment.