fix build system: make eo/edo examples works
This commit is contained in:
parent
8a81bd2191
commit
0829afceb9
10 changed files with 61 additions and 79 deletions
|
|
@ -1,27 +1,33 @@
|
|||
PROJECT(eda)
|
||||
project(eda)
|
||||
|
||||
FIND_PACKAGE(Boost 1.33.0)
|
||||
find_package(Boost 1.33.0)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
|
||||
SET(RESOURCES
|
||||
include_directories(${EO_SRC_DIR}/src)
|
||||
include_directories(${EDO_SRC_DIR}/src)
|
||||
link_directories(${EO_BIN_DIR}/${LIB})
|
||||
link_directories(${EDO_BIN_DIR}/${LIB})
|
||||
|
||||
set(RESOURCES
|
||||
${PROJECT_NAME}.param
|
||||
)
|
||||
|
||||
FOREACH(file ${RESOURCES})
|
||||
EXECUTE_PROCESS(
|
||||
foreach(FILE ${RESOURCES})
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||
${EDO_BINARY_DIR}/${file}
|
||||
${EDO_BIN_DIR}/${file}
|
||||
)
|
||||
ENDFOREACH(file)
|
||||
endforeach(FILE)
|
||||
|
||||
FILE(GLOB SOURCES *.cpp)
|
||||
file(GLOB SOURCES *.cpp)
|
||||
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR})
|
||||
set(EXECUTABLE_OUTPUT_PATH ${EDO_BIN_DIR})
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCES})
|
||||
target_link_libraries(${PROJECT_NAME} eo eoutils edoutils ${Boost_LIBRARIES})
|
||||
|
||||
ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES})
|
||||
TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${Boost_LIBRARIES})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue