39 lines
1.0 KiB
CMake
39 lines
1.0 KiB
CMake
cmake_minimum_required (VERSION 3.1)
|
|
|
|
file (GLOB CPPClasses "CPPClasses/Src/*.cpp")
|
|
|
|
add_library (CIMFramework SHARED
|
|
src/CimAnonymous.cpp
|
|
src/CimBase.cpp
|
|
src/CimClassFactory.cpp
|
|
src/CimTypedUtils.cpp
|
|
CimFramework.rc
|
|
${CPPClasses}
|
|
)
|
|
|
|
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
set( outputname "CPPCimFramework_x64" )
|
|
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
set( outputname "CPPCimFramework" )
|
|
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
|
|
set_target_properties (CIMFramework PROPERTIES POSITION_INDEPENDENT_CODE ON OUTPUT_NAME ${outputname})
|
|
|
|
target_link_libraries (CIMFramework CimFrameworkUntyped)
|
|
|
|
include_directories (
|
|
"include/"
|
|
)
|
|
|
|
target_include_directories (CIMFramework
|
|
PUBLIC
|
|
"CPPClasses/Include/"
|
|
)
|
|
|
|
if (MSVC)
|
|
add_definitions(-DCIMFRAMEWORK_DLL -DCIMFRAMEWORK_EXPORTS)
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /guard:cf")
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /guard:cf")
|
|
else (MSVC)
|
|
set(CMAKE_CXX_FLAGS "-static-libgcc")
|
|
endif (MSVC) |