Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FMILibrary compatible for cross compilation #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ if(FMILIB_BUILD_STATIC_LIB)
include(mergestaticlibs)
if(WIN32)
merge_static_libs(fmilib ${FMILIB_SUBLIBS})
target_link_libraries(fmilib Shlwapi)
target_link_libraries(fmilib shlwapi)
foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
set(flags "")
string(TOUPPER "STATIC_LIBRARY_FLAGS_${CONFIG_TYPE}" PROPNAME)
get_target_property(flags fmilib ${PROPNAME})
set_target_properties(fmilib PROPERTIES ${PROPNAME} "${flags} Shlwapi.lib")
set_target_properties(fmilib PROPERTIES ${PROPNAME} "${flags} shlwapi.lib")
endforeach()
else()
merge_static_libs(fmilib ${FMILIB_SUBLIBS})
Expand Down
5 changes: 5 additions & 0 deletions Config.cmake/fmixml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ set(EXPAT_SETTINGS
-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/ExpatEx/install
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
-DCMAKE_SYSTEM_NAME:STRING=${CMAKE_SYSTEM_NAME}
-DCMAKE_SYSTEM_VERSION:STRING=${CMAKE_SYSTEM_VERSION}

)

ExternalProject_Add(
Expand Down
2 changes: 1 addition & 1 deletion Config.cmake/jmutil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ set(JMUTILS_PUBLIC_INCLUDE_DIRS
if(UNIX)
set(JMUTILS_DEPENDENCY_LIBS c99snprintf dl)
else()
set(JMUTILS_DEPENDENCY_LIBS c99snprintf Shlwapi)
set(JMUTILS_DEPENDENCY_LIBS c99snprintf shlwapi)
endif()

add_library(jmutils STATIC ${JMUTILSOURCE} ${JMUTILHEADERS})
Expand Down