FindCIMpp.cmake 854 Bytes
Newer Older
Markus Mirz's avatar
Markus Mirz committed
1
if(NOT CIM_VERSION)
Markus Mirz's avatar
Markus Mirz committed
2
	set(CIM_VERSION "CGMES_2.4.15_16FEB2016")
Markus Mirz's avatar
Markus Mirz committed
3
4
5
6
7
8
9
10
11
12
13
endif()

message(STATUS "CIM Version: ${CIM_VERSION}")

if(CIM_VERSION STREQUAL "16v29a")
	set(USE_CIM_VERSION "IEC61970_16v29a")
endif()
if(CIM_VERSION STREQUAL "CGMES_2.4.15_16FEB2016")
	set(USE_CIM_VERSION "CGMES_2.4.15_16FEB2016")
	set(CGMES_BUILD ON)
endif()
14
15
16
17
18
19

find_path(CIMPP_INCLUDE_DIR
	NAMES CIMModel.hpp
	PATH_SUFFIXES
		cimpp/${CIM_VERSION}
		${CIM_VERSION}
Jan Dinkelbach's avatar
Jan Dinkelbach committed
20
21
		cimpp/${USE_CIM_VERSION}
		${USE_CIM_VERSION}
22
23
24
		include/src
)
find_library(CIMPP_LIBRARY
Jan Dinkelbach's avatar
Jan Dinkelbach committed
25
	NAMES cimpp${CIM_VERSION} cimpp${USE_CIM_VERSION}
26
27
28
29
30
31
32
33
34
	PATH_SUFFIXES
		lib/static
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CIMpp DEFAULT_MSG CIMPP_LIBRARY CIMPP_INCLUDE_DIR)

set(CIMPP_LIBRARIES ${CIMPP_LIBRARY} ${ARABICA_LIBRARY})
set(CIMPP_INCLUDE_DIRS ${CIMPP_INCLUDE_DIR} ${ARABICA_INCLUDE_DIR})