Commit dcbfb0dc authored by Nicolas Docquier's avatar Nicolas Docquier
Browse files

Separate build: adapt CMakeLists.txt for separate build with Windows (visual compiler)

parent b5a2d654
......@@ -29,8 +29,10 @@ increment_src( ${PROJECT_SOURCE_DIR} )
increment_void_symbolic( symbolicR )
if(FLAG_SHARED_LIB)
message(STATUS "Symbolic: FLAG_SHARED_LIB TRUE")
add_library(Project_symbolic SHARED ${SOURCE_FILES})
else()
message(STATUS "Symbolic: FLAG_SHARED_LIB FALSE")
add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
add_definitions( -DPROJECT_USERFCT_STATIC_DEFINE)
......
......@@ -57,6 +57,9 @@ SET(FLAG_REAL_TIME @FLAG_REAL_TIME@)
SET(FLAG_PLOT @FLAG_PLOT@)
SET(FLAG_VISU @FLAG_VISU@)
# Shared lib compilation
SET(FLAG_SHARED_LIB @FLAG_SHARED_LIB@)
#############
# INCLUDE DIRECTORIES
#############
......
......@@ -44,6 +44,8 @@ message(STATUS "Test----->" ${LIBXML2_LIBRARIES})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
install ( TARGETS MBsysC_module DESTINATION ${CMAKE_INSTALL_PREFIX})
add_definitions( -DPROJECT_USERFCT_STATIC_DEFINE)
else( )
add_library(MBsysC_module STATIC ${SOURCE_FILES} ${INCLUDE_DIR})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
......@@ -229,7 +229,7 @@ int EQUIL_fct_equil(double *x, int n_x, double *Fu, MDS_gen_strct *mds_gen_strct
{
equil_gen_strct->xeq_ptr[i][0] = x[i];
}
MDS_opti_relate_data(mds_gen_strct);
//MDS_opti_relate_data(mds_gen_strct);
fail = compute_Fr_uc( Fr_uc, mds_gen_strct,mbs_part, mbs_aux, mbs_data );
......
......@@ -71,13 +71,18 @@ set(LIB_MBSYSC_REALTIME ${LIB_MBSYSC_REALTIME} PARENT_SCOPE)
if(FLAG_SHARED_LIB)
add_library(${LIB_MBSYSC_REALTIME} SHARED ${SOURCE_FILES} ${INCLUDE_DIR})
add_library(${LIB_MBSYSC_REALTIME} SHARED ${SOURCE_FILES} ${INCLUDE_DIR})
else()
add_library(${LIB_MBSYSC_REALTIME} STATIC ${SOURCE_FILES} ${INCLUDE_DIR})
add_definitions( -DPROJECT_USERFCT_STATIC_DEFINE)
add_definitions( -DPROJECT_UTILITIES_STATIC_DEFINE)
endif()
if(FLAG_PRJ_FCT_PTR)
add_definitions( -DPROJECT_USERFCT_STATIC_DEFINE)
target_link_libraries (${LIB_MBSYSC_REALTIME} MBsysC_struct)
endif()
target_link_libraries (${LIB_MBSYSC_REALTIME} ${LIB_MBSYSC_UTILITIES})
include (GenerateExportHeader)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment