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,33 +1,37 @@
|
|||
PROJECT(cmaes)
|
||||
project(cmaes)
|
||||
|
||||
|
||||
#find_package(Eigen3 REQUIRED)
|
||||
#include_directories(EIGEN3_INCLUDE_DIR)
|
||||
INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} )
|
||||
MESSAGE( "MESSAGE:" ${EIGEN3_INCLUDE_DIR} )
|
||||
include_directories( ${EIGEN3_INCLUDE_DIR} )
|
||||
#message( "MESSAGE:" ${EIGEN3_INCLUDE_DIR} )
|
||||
|
||||
#FIND_PACKAGE(Boost 1.33.0)
|
||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
||||
#find_package(Boost 1.33.0)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${EO_SRC_DIR}/src)
|
||||
include_directories(${EDO_SRC_DIR}/src)
|
||||
link_directories(${EO_BIN_DIRS}/${LIB})
|
||||
link_directories(${EDO_BIN_DIRS}/${LIB})
|
||||
|
||||
SET(RESOURCES
|
||||
${PROJECT_NAME}.param
|
||||
)
|
||||
# set(RESOURCES
|
||||
# ${PROJECT_NAME}.param
|
||||
# )
|
||||
#
|
||||
# foreach(file ${RESOURCES})
|
||||
# execute_process(
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||
# ${EDO_BIN_DIR}/${file}
|
||||
# )
|
||||
# endforeach(file)
|
||||
|
||||
FOREACH(file ${RESOURCES})
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||
${EDO_BINARY_DIR}/${file}
|
||||
)
|
||||
ENDFOREACH(file)
|
||||
#file(GLOB SOURCES *.cpp)
|
||||
|
||||
#FILE(GLOB SOURCES *.cpp)
|
||||
set(EXECUTABLE_OUTPUT_PATH ${EDO_BIN_DIR})
|
||||
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR})
|
||||
|
||||
ADD_EXECUTABLE(${PROJECT_NAME} main.cpp)
|
||||
TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${Boost_LIBRARIES})
|
||||
add_executable(${PROJECT_NAME} main.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} eo eoutils edoutils ${Boost_LIBRARIES})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue