Commit 5a30dc71 authored by Timothee Habra's avatar Timothee Habra
Browse files

windows dll compilation

parent 3ad862ba
......@@ -31,7 +31,6 @@ increment_void_symbolic( symbolicR )
include (GenerateExportHeader)
add_library(project_symbolic ${SOURCE_FILES} ${INCLUDE_DIR})
target_link_libraries(MBsysC_struct)
GENERATE_EXPORT_HEADER( project_symbolic )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
......
......@@ -99,14 +99,14 @@ ELSE (UNIX)
SET(TRIAL_PATHS_INC_ICONV
${PROJECT_SOURCE_DIR}/src/other/${WIN_LIB_DIRECTORY}/include
${PROJECT_ABS_PATH}/src/other/${WIN_LIB_DIRECTORY}/include
${ROBOTRAN_DIR_COMMON}/${WIN_LIB_DIRECTORY}/include
${ROBOTRAN_SOURCE_DIR}/${WIN_LIB_DIRECTORY}/include
)
# possible paths for: 'xpath.h'
SET(TRIAL_PATHS_INC_LIBXML
${PROJECT_SOURCE_DIR}/src/other/${WIN_LIB_DIRECTORY}/include/libxml
${PROJECT_ABS_PATH}/src/other/${WIN_LIB_DIRECTORY}/include/libxml
${ROBOTRAN_DIR_COMMON}/${WIN_LIB_DIRECTORY}/include/libxml
${ROBOTRAN_SOURCE_DIR}/${WIN_LIB_DIRECTORY}/include/libxml
)
# possible paths for: 'iconv.lib'
......
......@@ -81,28 +81,28 @@ ELSE (UNIX)
SET(TRIAL_PATHS_INC
${PROJECT_SOURCE_DIR}/src/other/${WIN_LIB_DIRECTORY}/include/SDL
${PROJECT_ABS_PATH}/src/other/${WIN_LIB_DIRECTORY}/include/SDL
${ROBOTRAN_DIR_COMMON}/${WIN_LIB_DIRECTORY}/include/SDL
${ROBOTRAN_SOURCE_DIR}/${WIN_LIB_DIRECTORY}/include/SDL
)
# possible paths for: 'SDL2.lib'
SET(TRIAL_PATHS_LIB_SDL2
${PROJECT_SOURCE_DIR}/src/other/${WIN_LIB_DIRECTORY}/lib
${PROJECT_ABS_PATH}/src/other/${WIN_LIB_DIRECTORY}/lib
${ROBOTRAN_DIR_COMMON}/${WIN_LIB_DIRECTORY}/lib
${ROBOTRAN_SOURCE_DIR}/${WIN_LIB_DIRECTORY}/lib
)
# possible paths for: 'SDL2main.lib'
SET(TRIAL_PATHS_LIB_MAIN
${PROJECT_SOURCE_DIR}/src/other/${WIN_LIB_DIRECTORY}/lib
${PROJECT_ABS_PATH}/src/other/${WIN_LIB_DIRECTORY}/lib
${ROBOTRAN_DIR_COMMON}/${WIN_LIB_DIRECTORY}/lib
${ROBOTRAN_SOURCE_DIR}/${WIN_LIB_DIRECTORY}/lib
)
# possible paths for: 'SDL2test.lib'
SET(TRIAL_PATHS_LIB_TEST
${PROJECT_SOURCE_DIR}/src/other/${WIN_LIB_DIRECTORY}/lib
${PROJECT_ABS_PATH}/src/other/${WIN_LIB_DIRECTORY}/lib
${ROBOTRAN_DIR_COMMON}/${WIN_LIB_DIRECTORY}/lib
${ROBOTRAN_SOURCE_DIR}/${WIN_LIB_DIRECTORY}/lib
)
FIND_PATH(SDL2_INCLUDE_PATH SDL.h ${TRIAL_PATHS_INC})
......
......@@ -12,6 +12,17 @@ project(MBsysC)
set( CMAKE_C_FLAGS_RELEASE "-O3" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3" )
if (WIN32)
## --- WIN32 or WIN64 DETECTION --- ##
if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) # 64bit Windows
SET(WIN_LIB_DIRECTORY win64_include_lib)
else( ) # 32bit Windows
SET(WIN_LIB_DIRECTORY win32_include_lib)
endif( )
endif()
set( ROBOTRAN_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../")
# link to useful CMake functions
set(CMAKE_AUX "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_aux")
set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux)
......
#ifndef PROJECT_USERFCT_EXPORT_H
#define PROJECT_USERFCT_EXPORT_H
#ifdef _WIN32
#ifdef PROJECT_USERFCT_STATIC_DEFINE
# define PROJECT_USERFCT_EXPORT
# define PROJECT_USERFCT_NO_EXPORT
#else
# ifndef PROJECT_USERFCT_EXPORT
# ifdef Project_userfct_EXPORTS
/* We are building this library */
# define PROJECT_USERFCT_EXPORT
# else
/* We are using this library */
# define PROJECT_USERFCT_EXPORT
# endif
# endif
# ifndef PROJECT_USERFCT_NO_EXPORT
# define PROJECT_USERFCT_NO_EXPORT
# endif
#endif
#ifndef PROJECT_USERFCT_DEPRECATED
# define PROJECT_USERFCT_DEPRECATED __declspec(deprecated)
# define PROJECT_USERFCT_DEPRECATED_EXPORT PROJECT_USERFCT_EXPORT __declspec(deprecated)
# define PROJECT_USERFCT_DEPRECATED_NO_EXPORT PROJECT_USERFCT_NO_EXPORT __declspec(deprecated)
#endif
#else
# define PROJECT_USERFCT_EXPORT
#endif
#define DEFINE_NO_DEPRECATED 0
#if DEFINE_NO_DEPRECATED
# define PROJECT_USERFCT_NO_DEPRECATED
#endif
#endif
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