Adding CMakeLists.txt example to compile the provided .cpp examples

Installing .cif and .agds files examples
This commit is contained in:
Damien Dupuis 2010-06-14 11:10:23 +00:00
parent dd66d66741
commit 688af29e22
6 changed files with 38 additions and 0 deletions

View File

@ -1,2 +1,4 @@
ADD_SUBDIRECTORY(cplusplus)
ADD_SUBDIRECTORY(python)
INSTALL ( FILES transistor.agds DESTINATION share/doc/coriolis2/examples/vlsisapd/agds )

View File

@ -3,3 +3,4 @@ ADD_EXECUTABLE ( driveAgds driveAgds.cpp )
TARGET_LINK_LIBRARIES ( driveAgds agds ) # 'driveAgds' is the name of the executable and 'agds' the name of the target library in agds/src/CMakeLists.txt
INSTALL ( TARGETS driveAgds DESTINATION share/doc/coriolis2/examples/vlsisapd/agds )
INSTALL ( FILES driveAgds.cpp DESTINATION share/doc/coriolis2/examples/vlsisapd/agds )
INSTALL ( FILES cmake.ex DESTINATION share/doc/coriolis2/examples/vlsisapd/agds RENAME CMakeLists.txt )

View File

@ -0,0 +1,16 @@
PROJECT(DRIVEAGDS)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)
SET(CMAKE_MODULE_PATH "$ENV{VLSISAPD_USER_TOP}/share/cmake/Modules"
"$ENV{VLSISAPD_TOP}/share/cmake/Modules"
)
FIND_PACKAGE(VLSISAPD REQUIRED)
IF(AGDS_FOUND)
INCLUDE_DIRECTORIES ( ${AGDS_INCLUDE_DIR} )
ADD_EXECUTABLE ( driveAgds driveAgds.cpp )
TARGET_LINK_LIBRARIES ( driveAgds ${AGDS_LIBRARY} )
INSTALL ( TARGETS driveAgds DESTINATION . )
ENDIF(AGDS_FOUND)

View File

@ -1,2 +1,4 @@
ADD_SUBDIRECTORY(cplusplus)
ADD_SUBDIRECTORY(python)
INSTALL ( FILES transistor.cif DESTINATION share/doc/coriolis2/examples/vlsisapd/cif )

View File

@ -3,3 +3,4 @@ ADD_EXECUTABLE ( driveCif driveCif.cpp )
TARGET_LINK_LIBRARIES ( driveCif cif ) # 'driveCif' is the name of the executable and 'cif' the name of the target library in cif/src/CMakeLists.txt
INSTALL ( TARGETS driveCif DESTINATION share/doc/coriolis2/examples/vlsisapd/cif )
INSTALL ( FILES driveCif.cpp DESTINATION share/doc/coriolis2/examples/vlsisapd/cif )
INSTALL ( FILES cmake.ex DESTINATION share/doc/coriolis2/examples/vlsisapd/cif RENAME CMakeLists.txt )

View File

@ -0,0 +1,16 @@
PROJECT(DRIVECIF)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)
SET(CMAKE_MODULE_PATH "$ENV{VLSISAPD_USER_TOP}/share/cmake/Modules"
"$ENV{VLSISAPD_TOP}/share/cmake/Modules"
)
FIND_PACKAGE(VLSISAPD REQUIRED)
IF(CIF_FOUND)
INCLUDE_DIRECTORIES ( ${CIF_INCLUDE_DIR} )
ADD_EXECUTABLE ( driveCif driveCif.cpp )
TARGET_LINK_LIBRARIES ( driveCif ${CIF_LIBRARY} )
INSTALL ( TARGETS driveCif DESTINATION . )
ENDIF(CIF_FOUND)